Skip to content

Commit

Permalink
Merge pull request #11 from pufferfish101007/patch-2
Browse files Browse the repository at this point in the history
use self.nchannels such that it is defined
  • Loading branch information
twardoch authored Sep 17, 2024
2 parents 48b54f2 + 5d55329 commit 9c50601
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audiostretchy/stretch.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def save_mp3(self, audio_file: BinaryIO, bit_rate: int = 128, quality: int = 5):
encoder.set_channels(self.nchannels)
encoder.set_quality(quality)
encoder.set_mode(
mp3.MODE_STEREO if nchannels == 2 else mp3.MODE_SINGLE_CHANNEL
mp3.MODE_STEREO if self.nchannels == 2 else mp3.MODE_SINGLE_CHANNEL
)
encoder.write(self.pcm)
except ImportError:
Expand Down

0 comments on commit 9c50601

Please sign in to comment.