mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Submit parts of FS#12189 regarding codec API. Replaces access to global settings with a dedicated function to determine if the current track shall be looped. Used by several synthesizer codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30391 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e66ad3e8a8
commit
e88d24a840
13 changed files with 38 additions and 29 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "buffering.h"
|
||||
#include "dsp.h"
|
||||
#include "metadata.h"
|
||||
#include "settings.h"
|
||||
|
||||
/* Define LOGF_ENABLE to enable logf output in this file */
|
||||
/*#define LOGF_ENABLE*/
|
||||
|
@ -405,6 +406,11 @@ static enum codec_command_action
|
|||
}
|
||||
}
|
||||
|
||||
static bool codec_loop_track_callback(void)
|
||||
{
|
||||
return global_settings.repeat_mode == REPEAT_ONE;
|
||||
}
|
||||
|
||||
/* Initialize codec API */
|
||||
void codec_init_codec_api(void)
|
||||
{
|
||||
|
@ -421,6 +427,7 @@ void codec_init_codec_api(void)
|
|||
ci.set_offset = audio_codec_update_offset;
|
||||
ci.configure = codec_configure_callback;
|
||||
ci.get_command = codec_get_command_callback;
|
||||
ci.loop_track = codec_loop_track_callback;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue