forked from len0rd/rockbox
SWCODEC recording hang fixed. Fixed other trouble spots for codec swapping when playing. Removed call to audio_set_recording_options from fm_recording_settings on SWCODEC (Not proper to do ! My bad.).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10978 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d8f32834d6
commit
9d56f2d2cf
2 changed files with 8 additions and 15 deletions
|
@ -951,19 +951,13 @@ static void* voice_request_buffer_callback(size_t *realsize, size_t reqsize)
|
|||
case Q_AUDIO_PLAY:
|
||||
LOGFQUEUE("voice < Q_AUDIO_PLAY");
|
||||
if (playing)
|
||||
{
|
||||
if (audio_codec_loaded)
|
||||
swap_codec();
|
||||
else
|
||||
yield();
|
||||
}
|
||||
swap_codec();
|
||||
break;
|
||||
|
||||
#if defined(HAVE_RECORDING) && !defined(SIMULATOR)
|
||||
case Q_ENCODER_RECORD:
|
||||
LOGFQUEUE("voice < Q_ENCODER_RECORD");
|
||||
if (audio_codec_loaded)
|
||||
swap_codec();
|
||||
swap_codec();
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -1747,7 +1741,8 @@ static void codec_thread(void)
|
|||
LOGFQUEUE("codec < Q_CODEC_LOAD_DISK");
|
||||
audio_codec_loaded = true;
|
||||
#ifdef PLAYBACK_VOICE
|
||||
if (voice_codec_loaded)
|
||||
/* Don't sent messages to voice codec if it's not current */
|
||||
if (voice_codec_loaded && current_codec == CODEC_IDX_VOICE)
|
||||
{
|
||||
LOGFQUEUE("codec > voice Q_AUDIO_PLAY");
|
||||
queue_post(&voice_queue, Q_AUDIO_PLAY, 0);
|
||||
|
@ -1776,7 +1771,7 @@ static void codec_thread(void)
|
|||
|
||||
audio_codec_loaded = true;
|
||||
#ifdef PLAYBACK_VOICE
|
||||
if (voice_codec_loaded)
|
||||
if (voice_codec_loaded && current_codec == CODEC_IDX_VOICE)
|
||||
{
|
||||
LOGFQUEUE("codec > voice Q_AUDIO_PLAY");
|
||||
queue_post(&voice_queue, Q_AUDIO_PLAY, 0);
|
||||
|
@ -1794,7 +1789,7 @@ static void codec_thread(void)
|
|||
#if defined(HAVE_RECORDING) && !defined(SIMULATOR)
|
||||
case Q_ENCODER_LOAD_DISK:
|
||||
LOGFQUEUE("codec < Q_ENCODER_LOAD_DISK");
|
||||
audio_codec_loaded = false;
|
||||
audio_codec_loaded = false; /* Not audio codec! */
|
||||
#ifdef PLAYBACK_VOICE
|
||||
if (voice_codec_loaded && current_codec == CODEC_IDX_VOICE)
|
||||
{
|
||||
|
|
|
@ -1635,19 +1635,17 @@ static bool fm_recording_settings(void)
|
|||
{
|
||||
bool ret = recording_menu(true);
|
||||
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
if (!ret)
|
||||
{
|
||||
rec_set_recording_options(global_settings.rec_frequency,
|
||||
global_settings.rec_quality,
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
AUDIO_SRC_FMRADIO, SRCF_FMRADIO_PLAYING,
|
||||
#else
|
||||
AUDIO_SRC_LINEIN, 0,
|
||||
#endif
|
||||
global_settings.rec_channels,
|
||||
global_settings.rec_editable,
|
||||
global_settings.rec_prerecord_time);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue