summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-04-04 12:36:06 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-04-04 12:36:06 +0000
commite1f70587ce13100e8b1703c55fa497e55ee7a3d3 (patch)
tree5bcab433dded6c6f135e56461b0379d3cefcc3cc /apps
parent8a237a829e0f63b61536f315209a6d0ea1477e31 (diff)
downloadrockbox-e1f70587ce13100e8b1703c55fa497e55ee7a3d3.tar.gz
rockbox-e1f70587ce13100e8b1703c55fa497e55ee7a3d3.tar.bz2
rockbox-e1f70587ce13100e8b1703c55fa497e55ee7a3d3.zip
More audio code restructuring, mostly renaming functions so far
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6247 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/recorder/radio.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 128beaee4b..10a513f01f 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -29,6 +29,7 @@
#include "status.h"
#include "kernel.h"
#include "mpeg.h"
+#include "audio.h"
#include "mp3_playback.h"
#include "ctype.h"
#include "file.h"
@@ -199,7 +200,7 @@ bool radio_screen(void)
if(rec_create_directory() > 0)
have_recorded = true;
- mpeg_stop();
+ audio_stop();
mpeg_init_recording();
@@ -281,9 +282,9 @@ bool radio_screen(void)
{
case FM_STOP:
#ifndef SIMULATOR
- if(mpeg_status() == MPEG_STATUS_RECORD)
+ if(audio_status() == AUDIO_STATUS_RECORD)
{
- mpeg_stop();
+ audio_stop();
}
else
#endif
@@ -296,7 +297,7 @@ bool radio_screen(void)
#ifdef FM_RECORD
case FM_RECORD:
#ifndef SIMULATOR
- if(mpeg_status() == MPEG_STATUS_RECORD)
+ if(audio_status() == AUDIO_STATUS_RECORD)
{
mpeg_new_file(rec_create_filename(buf));
update_screen = true;
@@ -315,8 +316,8 @@ bool radio_screen(void)
case FM_EXIT:
#ifndef SIMULATOR
- if(mpeg_status() == MPEG_STATUS_RECORD)
- mpeg_stop();
+ if(audio_status() == AUDIO_STATUS_RECORD)
+ audio_stop();
#endif
done = true;
keep_playing = true;
@@ -421,7 +422,7 @@ bool radio_screen(void)
#endif
case SYS_USB_CONNECTED:
/* Only accept USB connection when not recording */
- if(mpeg_status() != MPEG_STATUS_RECORD)
+ if(audio_status() != AUDIO_STATUS_RECORD)
{
default_event_handler(SYS_USB_CONNECTED);
screen_freeze = true; /* Cosmetic: makes sure the
@@ -442,7 +443,7 @@ bool radio_screen(void)
lcd_setmargins(0, 8);
/* Only display the peak meter when not recording */
- if(!mpeg_status())
+ if(!audio_status())
{
lcd_clearrect(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh);
peak_meter_draw(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh);
@@ -490,7 +491,7 @@ bool radio_screen(void)
str(LANG_CHANNEL_MONO));
lcd_puts(0, top_of_screen + 2, buf);
- if(mpeg_status() == MPEG_STATUS_RECORD)
+ if(audio_status() == AUDIO_STATUS_RECORD)
{
hours = seconds / 3600;
minutes = (seconds - (hours * 3600)) / 60;
@@ -520,19 +521,19 @@ bool radio_screen(void)
status_draw(update_screen);
}
- if(mpeg_status() & MPEG_STATUS_ERROR)
+ if(audio_status() & AUDIO_STATUS_ERROR)
{
done = true;
}
}
#ifndef SIMULATOR
- if(mpeg_status() & MPEG_STATUS_ERROR)
+ if(audio_status() & AUDIO_STATUS_ERROR)
{
splash(0, true, str(LANG_DISK_FULL));
status_draw(true);
lcd_update();
- mpeg_error_clear();
+ audio_error_clear();
while(1)
{
@@ -542,7 +543,7 @@ bool radio_screen(void)
}
}
- mpeg_init_playback();
+ audio_init_playback();
sound_settings_apply();