From c0e7c39e84f528929eb334166fb3daf93793974c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 26 Sep 2014 08:40:35 +0200 Subject: Clean up - ready for release. --- src/source.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/source.cc') 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() -- cgit v1.2.3