ws-apifix: one bitrate unit: every encoder's bitrate option is bit/s (MP3 now too), values below 1000 are kbit/s (the old MP3 values keep working; Opus accepts them too); the MP3 Decoder's bitrate field is bit/s as the Decoder contract says (was kbit/s)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c4168d751f
commit
51630729f6
10 files changed
+35
-14
No files matched your search
@@ -112,7 +112,7 @@ end
|
||||
`F.convert` streams audio: the encoder reads the decoder as it goes.
|
||||
|
||||
```luau
|
||||
local mp3 = assert(F.convert(flacBytes, "mp3", { bitrate = 192 })) -- MP3 bit rates are in kbit/s
|
||||
local mp3 = assert(F.convert(flacBytes, "mp3", { bitrate = 192000 })) -- bit rates are in bit/s
|
||||
local dec = assert(F.audio.open(mp3))
|
||||
assert(dec.sampleRate == 44100 and dec.channels == 2)
|
||||
assert(math.abs(dec.duration - 1) < 0.1)
|
||||
|
||||
Reference in new issue
Block a user