1
0
Fork 0
forked from len0rd/rockbox

Make PCM->driver interface about as simple as it will get. Registered callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2010-05-24 16:42:32 +00:00
parent 6688988ec4
commit d56999890f
19 changed files with 277 additions and 460 deletions

View file

@ -982,7 +982,7 @@ uint32_t ICODE_ATTR buffer_magnitude(int16_t *input)
/* Stop the recording when the buffer is full */
#ifndef SIMULATOR
int recording_callback(int status)
void recording_callback(int status, void **start, size_t *size)
{
int tail = audio_tail ^ 1;
@ -991,10 +991,9 @@ int recording_callback(int status)
audio_tail = tail;
/* Always record full buffer, even if not required */
rb->pcm_record_more(audio_data[tail],
BUFFER_SIZE * sizeof (int16_t));
*start = audio_data[tail];
*size = BUFFER_SIZE * sizeof (int16_t);
return 0;
(void)status;
}
#endif