Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/common/Util/Clooper/audio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/Util/Clooper/audio.cpp')
-rw-r--r--common/Util/Clooper/audio.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/common/Util/Clooper/audio.cpp b/common/Util/Clooper/audio.cpp
index 343bc99..fea9c73 100644
--- a/common/Util/Clooper/audio.cpp
+++ b/common/Util/Clooper/audio.cpp
@@ -119,8 +119,10 @@ struct SystemStuff
snd_pcm_hw_params_get_period_size_max(hw, &maxb,&maxd);
ll->printf(2, "FYI: period size range is [%li/%i,%li/%i]\n", minb,mind, maxb, maxd);
- assert(mind == 0); //rate_resample 0 makes this true right?
- assert(maxd == 0); //rate_resample 0 makes this true right?
+ if ((mind != 0) || (maxd == 0))
+ {
+ ll->printf(2, "watch out, mind and maxd non-zero... you didn't set rate_resample to 0 did you...\n");
+ }
if (period0 < minb)
{
@@ -196,7 +198,11 @@ open_error:
err = snd_pcm_writei (phandle, frame_data, frame_count );
if (err == (signed)frame_count) return 0; //success
- assert(err < 0);
+ if (err >= 0)
+ {
+ ll->printf(0, "madness on line %s:%i\n", __FILE__, __LINE__);
+ return -1;
+ }
const char * msg = NULL;
snd_pcm_state_t state = snd_pcm_state(phandle);