Adopt review suggestions

This commit is contained in:
Josh Wu
2024-12-17 14:58:04 +08:00
committed by Antoine SOULIER
parent 9c59375ae0
commit 0b28bf28ee
3 changed files with 10 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ wavfile = wave.open(f_wav, 'rb')
samplerate = wavfile.getframerate()
nchannels = wavfile.getnchannels()
bitdepth = wavfile.getsampwidth() * 8
bit_depth = wavfile.getsampwidth() * 8
stream_length = wavfile.getnframes()
# --- Setup encoder ---
@@ -77,7 +77,7 @@ for i in range(0, stream_length, frame_length):
f_lc3.write(struct.pack('=H', frame_size))
pcm = wavfile.readframes(frame_length)
f_lc3.write(enc.encode(pcm, frame_size, bit_depth=bitdepth))
f_lc3.write(enc.encode(pcm, frame_size, bit_depth=bit_depth))
# --- Cleanup ---