mirror of
https://github.com/beetbox/beets.git
synced 2025-12-16 05:34:47 +01:00
opus: sample rate is always 48kHz
This commit is contained in:
parent
e1d34e20bf
commit
8dc1e223e9
2 changed files with 4 additions and 0 deletions
|
|
@ -1322,6 +1322,9 @@ class MediaFile(object):
|
|||
"""The audio's sample rate (an int)."""
|
||||
if hasattr(self.mgfile.info, 'sample_rate'):
|
||||
return self.mgfile.info.sample_rate
|
||||
elif self.type == 'opus':
|
||||
# Opus is always 48kHz internally.
|
||||
return 48000
|
||||
return 0
|
||||
|
||||
@property
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ READ_ONLY_CORRECT_DICTS = {
|
|||
'length': 1.0,
|
||||
'bitrate': 63216,
|
||||
'format': 'Opus',
|
||||
'samplerate': 48000,
|
||||
'bitdepth': 0,
|
||||
'channels': 1,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue