summaryrefslogtreecommitdiffstats
path: root/apps/recorder
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-02-23 14:31:13 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-02-23 14:31:13 +0000
commit65109732230849eeb9eec2f56f9e046ad6b476c3 (patch)
tree51096b18d823cfb05575335b91e3d1eb75ca4e27 /apps/recorder
parent43b38b71f5944c1a29060847b58d7e79f7dfe428 (diff)
downloadrockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.tar.gz
rockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.tar.bz2
rockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.zip
Give playback engine better control over the codec. Codec simply follows commands and doesn't concern itself with audio state. Get track change notification in on the actual last buffer insert of the track because now audio simply waits for a track change notify from PCM on the last track and it must be sent reliably. This is still at an intermediate stage but works. Codecs and plugins become incompatible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29387 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/pcm_record.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c
index 6ecb75f608..8c9207f232 100644
--- a/apps/recorder/pcm_record.c
+++ b/apps/recorder/pcm_record.c
@@ -31,6 +31,7 @@
#include "usb.h"
#include "buffer.h"
#include "general.h"
+#include "codec_thread.h"
#include "audio.h"
#include "sound.h"
#include "metadata.h"
@@ -41,8 +42,6 @@
/***************************************************************************/
-extern unsigned int codec_thread_id;
-
/** General recording state **/
static bool is_recording; /* We are recording */
static bool is_paused; /* We have paused */
@@ -900,8 +899,8 @@ static void pcmrec_flush(unsigned flush_num)
num >= flood_watermark ? "num" : "time");
prio_pcmrec = thread_set_priority(THREAD_ID_CURRENT,
thread_get_priority(THREAD_ID_CURRENT) - 4);
- prio_codec = thread_set_priority(codec_thread_id,
- thread_get_priority(codec_thread_id) - 4);
+ prio_codec = codec_thread_set_priority(
+ codec_thread_get_priority() - 4);
}
#endif
@@ -952,7 +951,7 @@ static void pcmrec_flush(unsigned flush_num)
/* return to original priorities */
logf("pcmrec: unboost priority");
thread_set_priority(THREAD_ID_CURRENT, prio_pcmrec);
- thread_set_priority(codec_thread_id, prio_codec);
+ codec_thread_set_priority(prio_codec);
}
last_flush_tick = current_tick; /* save tick when we left */