(self, audio_reader, little_endian, samples_24_bit_pretending_to_be_32_bit)
| 315 | |
| 316 | class AudioFileStream(object): |
| 317 | def __init__(self, audio_reader, little_endian, samples_24_bit_pretending_to_be_32_bit): |
| 318 | self.audio_reader = audio_reader # an audio file object (e.g., a `wave.Wave_read` instance) |
| 319 | self.little_endian = little_endian # whether the audio data is little-endian (when working with big-endian things, we'll have to convert it to little-endian before we process it) |
| 320 | self.samples_24_bit_pretending_to_be_32_bit = samples_24_bit_pretending_to_be_32_bit # this is true if the audio is 24-bit audio, but 24-bit audio isn't supported, so we have to pretend that this is 32-bit audio and convert it on the fly |
| 321 | |
| 322 | def read(self, size=-1): |
| 323 | buffer = self.audio_reader.readframes(self.audio_reader.getnframes() if size == -1 else size) |
nothing calls this directly
no outgoing calls
no test coverage detected