diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-09-26 08:40:35 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-09-26 08:40:35 +0200 |
commit | c0e7c39e84f528929eb334166fb3daf93793974c (patch) | |
tree | aafb07f00bde20b78fa0f33945df497c0a5d2337 /src/source.cc | |
parent | e87836cbb0001bec22326667456b20dca9fe2834 (diff) |
Clean up - ready for release.
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() |