diff options
Diffstat (limited to 'src/source.cc')
-rw-r--r-- | src/source.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/source.cc b/src/source.cc index 187a28e..03faa15 100644 --- a/src/source.cc +++ b/src/source.cc @@ -46,12 +46,6 @@ int Source::readSamples(char *pcm, size_t maxsize) { int rc; - /* - if(size < frames * sizeof(short) * channels) { - throw PcmBufferTooSmall(); - } - */ - rc = snd_pcm_readi(handle, pcm, maxsize / sizeof(short)); if(rc == -EPIPE) { // EPIPE means overrun @@ -61,7 +55,7 @@ int Source::readSamples(char *pcm, size_t maxsize) return -1; // Read Error } - return rc * sizeof(short) /* * channels */; + return rc * sizeof(short) * _channels; } unsigned int Source::samplerate() |