diff options
-rw-r--r-- | apps/mpeg.c | 5 | ||||
-rw-r--r-- | apps/radio/radio.c | 2 | ||||
-rw-r--r-- | apps/recorder/pcm_record.c | 3 | ||||
-rw-r--r-- | apps/recorder/recording.c | 4 | ||||
-rw-r--r-- | apps/talk.c | 5 | ||||
-rw-r--r-- | firmware/buffer.c | 7 | ||||
-rw-r--r-- | firmware/export/audio.h | 2 |
7 files changed, 13 insertions, 15 deletions
diff --git a/apps/mpeg.c b/apps/mpeg.c index a0182ad8d2..5e2816f633 100644 --- a/apps/mpeg.c +++ b/apps/mpeg.c @@ -2126,9 +2126,8 @@ void audio_init_playback(void) /**************************************************************************** * Recording functions ***************************************************************************/ -void audio_init_recording(unsigned int buffer_offset) +void audio_init_recording(void) { - buffer_offset = buffer_offset; init_recording_done = false; queue_post(&mpeg_queue, MPEG_INIT_RECORDING, 0); @@ -2648,7 +2647,7 @@ void audio_set_recording_gain(int left, int right, int type) (void)right; (void)type; } -void audio_init_recording(unsigned int buffer_offset) +void audio_init_recording(void) { /* a dummy */ (void)buffer_offset; diff --git a/apps/radio/radio.c b/apps/radio/radio.c index d687948c94..1a77709f9c 100644 --- a/apps/radio/radio.c +++ b/apps/radio/radio.c @@ -397,7 +397,7 @@ void radio_screen(void) #if CONFIG_CODEC != SWCODEC rec_create_directory(); - audio_init_recording(talk_get_bufsize()); + audio_init_recording(); sound_settings_apply(); /* Yes, we use the D/A for monitoring */ diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index 407a7e5f49..3b069b6dc8 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c @@ -392,12 +392,11 @@ void pcm_rec_init(void) /** * Initializes recording - call before calling any other recording function */ -void audio_init_recording(unsigned int buffer_offset) +void audio_init_recording(void) { logf("audio_init_recording"); queue_send(&pcmrec_queue, PCMREC_INIT, 0); logf("audio_init_recording done"); - (void)buffer_offset; } /* audio_init_recording */ /** diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 6faaa6c48c..453b2fc42d 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -1112,7 +1112,7 @@ bool recording_screen(bool no_source) #if CONFIG_CODEC == SWCODEC audio_close_recording(); #endif - audio_init_recording(0); + audio_init_recording(); sound_set_volume(global_settings.volume); #if CONFIG_RTC == 0 @@ -1213,7 +1213,7 @@ bool recording_screen(bool no_source) #if CONFIG_CODEC == SWCODEC audio_close_recording(); - audio_init_recording(0); + audio_init_recording(); #endif rec_init_recording_options(&rec_options); diff --git a/apps/talk.c b/apps/talk.c index 9fd6fb06ec..0211bcc1f8 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -41,6 +41,7 @@ #include "logf.h" #include "bitswap.h" #include "structec.h" +#include "plugin.h" /* plugin_get_buffer() */ #include "debug.h" @@ -290,7 +291,7 @@ static void load_voicefile(bool probe, char* buf, size_t bufsize) }; union voicebuf voicebuf; - int load_size, alloc_size; + size_t load_size, alloc_size; int got_size; #ifndef TALK_PARTIAL_LOAD size_t file_size; @@ -396,7 +397,7 @@ static void load_voicefile(bool probe, char* buf, size_t bufsize) #ifdef TALK_PARTIAL_LOAD alloc_size += silence_len + QUEUE_SIZE; #endif - if ((size_t)alloc_size > bufsize) + if (alloc_size > bufsize) goto load_err; return; diff --git a/firmware/buffer.c b/firmware/buffer.c index 2168087bd9..e0496fe149 100644 --- a/firmware/buffer.c +++ b/firmware/buffer.c @@ -31,7 +31,7 @@ /* defined in linker script */ #if (CONFIG_PLATFORM & PLATFORM_NATIVE) -#if defined(IPOD_VIDEO) +#if defined(IPOD_VIDEO) && !defined(BOOTLOADER) extern unsigned char *audiobufend_lds[]; unsigned char *audiobufend; #else /* !IPOD_VIDEO */ @@ -68,8 +68,8 @@ void buffer_init(void) { /* 32-bit aligned */ audiobuf = (void *)(((unsigned long)audiobuffer + 3) & ~3); - -#if defined(IPOD_VIDEO) + +#if defined(IPOD_VIDEO) && !defined(BOOTLOADER) && !defined(SIMULATOR) audiobufend=(unsigned char *)audiobufend_lds; if(MEMORYSIZE==64 && probed_ramsize!=64) { @@ -92,7 +92,6 @@ static volatile int lock; * Note that this does not modify the buffer position (buffer_release_buffer() * does), so call this if you want to aquire temporary memory **/ -#define _ALIGN (sizeof(char*)) void *buffer_get_buffer(size_t *size) { if (lock) diff --git a/firmware/export/audio.h b/firmware/export/audio.h index 6757bf143b..2835d8f4c4 100644 --- a/firmware/export/audio.h +++ b/firmware/export/audio.h @@ -193,7 +193,7 @@ struct audio_recording_options }; /* audio recording functions */ -void audio_init_recording(unsigned int buffer_offset); +void audio_init_recording(void); void audio_close_recording(void); void audio_record(const char *filename); void audio_stop_recording(void); |