summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2010-04-19 22:21:15 +0000
committerRobert Jonsson <spamatica@gmail.com>2010-04-19 22:21:15 +0000
commit4118d01445152262c070fd54c7771a2d5f43cbef (patch)
tree1c018c227a2fd8cdc76c48c8355e9e9382677e06
parent087b94d11f3319adb1d9514d60961e3688385e3d (diff)
tried to prettify alsa timer error
-rw-r--r--muse/muse/driver/alsatimer.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/muse/muse/driver/alsatimer.cpp b/muse/muse/driver/alsatimer.cpp
index 355208b6..277ecd34 100644
--- a/muse/muse/driver/alsatimer.cpp
+++ b/muse/muse/driver/alsatimer.cpp
@@ -142,11 +142,13 @@
setTick = (1000000000 / snd_timer_info_get_resolution(info)) / freq;
if (setTick == 0) {
- fprintf(stderr,"AlsaTimer::setTimerTicks(): requested freq %u Hz too high for timer (max is %g)\n",
- freq, 1000000000.0 / snd_timer_info_get_resolution(info));
- fprintf(stderr," freq stays at %ld Hz\n",
- (long int)((1000000000.0 / snd_timer_info_get_resolution(info)) / snd_timer_params_get_ticks(params))
- );
+ // return, print error if freq i below 500 (timing will suffer)
+ if (((1000000000.0 / snd_timer_info_get_resolution(info)) / snd_timer_params_get_ticks(params)) < 500) {
+ fprintf(stderr,"AlsaTimer::setTimerTicks(): requested freq %u Hz too high for timer (max is %g)\n",
+ freq, 1000000000.0 / snd_timer_info_get_resolution(info));
+ fprintf(stderr," freq stays at %ld Hz\n",
+ (long int)((1000000000.0 / snd_timer_info_get_resolution(info)) / snd_timer_params_get_ticks(params)));
+ }
return 0;
}