summaryrefslogtreecommitdiff
path: root/apps/wps.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-04-01 13:41:03 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-04-01 13:41:03 +0000
commit674eaca5ef59625f90088da006eca4d10e2bea56 (patch)
treeb0f02cec358ce1c506fb6d2256e2db059c7b6b6a /apps/wps.c
parent88d5aab5a1098c5636584ddf06bd3012dc8c5b4c (diff)
downloadrockbox-674eaca5ef59625f90088da006eca4d10e2bea56.tar.gz
rockbox-674eaca5ef59625f90088da006eca4d10e2bea56.zip
Moved the mpeg_sound_xxx() functions to sound.c and renamed them to sound_xxx()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6240 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps.c')
-rw-r--r--apps/wps.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/apps/wps.c b/apps/wps.c
index 91969df00e..d5f921c350 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -49,6 +49,7 @@
49#include "lang.h" 49#include "lang.h"
50#include "bookmark.h" 50#include "bookmark.h"
51#include "misc.h" 51#include "misc.h"
52#include "sound.h"
52 53
53#define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ 54#define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */
54 /* 3% of 30min file == 54s step size */ 55 /* 3% of 30min file == 54s step size */
@@ -172,17 +173,17 @@ static char current_track_path[MAX_PATH+1];
172*/ 173*/
173static bool setvol(void) 174static bool setvol(void)
174{ 175{
175 if (global_settings.volume < mpeg_sound_min(SOUND_VOLUME)) 176 if (global_settings.volume < sound_min(SOUND_VOLUME))
176 global_settings.volume = mpeg_sound_min(SOUND_VOLUME); 177 global_settings.volume = sound_min(SOUND_VOLUME);
177 if (global_settings.volume > mpeg_sound_max(SOUND_VOLUME)) 178 if (global_settings.volume > sound_max(SOUND_VOLUME))
178 global_settings.volume = mpeg_sound_max(SOUND_VOLUME); 179 global_settings.volume = sound_max(SOUND_VOLUME);
179 mpeg_sound_set(SOUND_VOLUME, global_settings.volume); 180 sound_set(SOUND_VOLUME, global_settings.volume);
180 status_draw(false); 181 status_draw(false);
181 wps_refresh(id3, nid3, 0, WPS_REFRESH_NON_STATIC); 182 wps_refresh(id3, nid3, 0, WPS_REFRESH_NON_STATIC);
182 settings_save(); 183 settings_save();
183#ifdef HAVE_LCD_CHARCELLS 184#ifdef HAVE_LCD_CHARCELLS
184 splash(0, false, "Vol: %d %% ", 185 splash(0, false, "Vol: %d %% ",
185 mpeg_val2phys(SOUND_VOLUME, global_settings.volume)); 186 sound_val2phys(SOUND_VOLUME, global_settings.volume));
186 return true; 187 return true;
187#endif 188#endif
188 return false; 189 return false;
@@ -388,7 +389,7 @@ static void fade(bool fade_in)
388 int current_volume = 20; 389 int current_volume = 20;
389 390
390 /* zero out the sound */ 391 /* zero out the sound */
391 mpeg_sound_set(SOUND_VOLUME, current_volume); 392 sound_set(SOUND_VOLUME, current_volume);
392 393
393 sleep(HZ/10); /* let mpeg thread run */ 394 sleep(HZ/10); /* let mpeg thread run */
394 mpeg_resume(); 395 mpeg_resume();
@@ -396,9 +397,9 @@ static void fade(bool fade_in)
396 while (current_volume < global_settings.volume) { 397 while (current_volume < global_settings.volume) {
397 current_volume += 2; 398 current_volume += 2;
398 sleep(1); 399 sleep(1);
399 mpeg_sound_set(SOUND_VOLUME, current_volume); 400 sound_set(SOUND_VOLUME, current_volume);
400 } 401 }
401 mpeg_sound_set(SOUND_VOLUME, global_settings.volume); 402 sound_set(SOUND_VOLUME, global_settings.volume);
402 } 403 }
403 else { 404 else {
404 /* fade out */ 405 /* fade out */
@@ -407,13 +408,13 @@ static void fade(bool fade_in)
407 while (current_volume > 20) { 408 while (current_volume > 20) {
408 current_volume -= 2; 409 current_volume -= 2;
409 sleep(1); 410 sleep(1);
410 mpeg_sound_set(SOUND_VOLUME, current_volume); 411 sound_set(SOUND_VOLUME, current_volume);
411 } 412 }
412 mpeg_pause(); 413 mpeg_pause();
413 sleep(HZ/5); /* let mpeg thread run */ 414 sleep(HZ/5); /* let mpeg thread run */
414 415
415 /* reset volume to what it was before the fade */ 416 /* reset volume to what it was before the fade */
416 mpeg_sound_set(SOUND_VOLUME, global_settings.volume); 417 sound_set(SOUND_VOLUME, global_settings.volume);
417 } 418 }
418} 419}
419 420