forked from len0rd/rockbox
WAV playback as a plugin, for archos recorders and Ondios. Plays 16-bit WAV files with all common sample frequencies, both mono and stereo. Meant as a preview for later PCM playback integration, and for doing experiments with the MAS PCM codec.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9273 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0ad19c7262
commit
0c09f3ee88
7 changed files with 3702 additions and 5 deletions
|
@ -44,7 +44,7 @@
|
||||||
#if CONFIG_CODEC == SWCODEC
|
#if CONFIG_CODEC == SWCODEC
|
||||||
#define MAX_FILETYPES 64
|
#define MAX_FILETYPES 64
|
||||||
#else
|
#else
|
||||||
#define MAX_FILETYPES 32
|
#define MAX_FILETYPES 40
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* max exttypes (extensions stored here) */
|
/* max exttypes (extensions stored here) */
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "logf.h"
|
#include "logf.h"
|
||||||
#include "screens.h"
|
#include "screens.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "i2c.h"
|
||||||
#include "mas.h"
|
#include "mas.h"
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
|
@ -403,6 +404,11 @@ static const struct plugin_api rockbox_api = {
|
||||||
/* new stuff at the end, sort into place next time
|
/* new stuff at the end, sort into place next time
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
set_sound,
|
set_sound,
|
||||||
|
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)) && !defined(SIMULATOR)
|
||||||
|
i2c_begin,
|
||||||
|
i2c_end,
|
||||||
|
i2c_write,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
int plugin_load(const char* plugin, void* parameter)
|
int plugin_load(const char* plugin, void* parameter)
|
||||||
|
|
|
@ -50,9 +50,11 @@
|
||||||
#include "profile.h"
|
#include "profile.h"
|
||||||
#endif
|
#endif
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#if (HWCODEC == SWCODEC)
|
#if (CONFIG_CODEC == SWCODEC)
|
||||||
#include "pcm_playback.h"
|
#include "pcm_playback.h"
|
||||||
#include "dsp.h"
|
#include "dsp.h"
|
||||||
|
#else
|
||||||
|
#include "mas.h"
|
||||||
#endif
|
#endif
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
@ -99,7 +101,7 @@
|
||||||
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
||||||
|
|
||||||
/* increase this every time the api struct changes */
|
/* increase this every time the api struct changes */
|
||||||
#define PLUGIN_API_VERSION 15
|
#define PLUGIN_API_VERSION 16
|
||||||
|
|
||||||
/* update this to latest version if a change to the api struct breaks
|
/* update this to latest version if a change to the api struct breaks
|
||||||
backwards compatibility (and please take the opportunity to sort in any
|
backwards compatibility (and please take the opportunity to sort in any
|
||||||
|
@ -472,7 +474,11 @@ struct plugin_api {
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
bool (*set_sound)(const unsigned char * string,
|
bool (*set_sound)(const unsigned char * string,
|
||||||
int* variable, int setting);
|
int* variable, int setting);
|
||||||
|
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)) && !defined(SIMULATOR)
|
||||||
|
void (*i2c_begin)(void);
|
||||||
|
void (*i2c_end)(void);
|
||||||
|
int (*i2c_write)(int address, unsigned char* buf, int count );
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/* plugin header */
|
/* plugin header */
|
||||||
|
|
|
@ -23,6 +23,10 @@ stopwatch.c
|
||||||
vbrfix.c
|
vbrfix.c
|
||||||
viewer.c
|
viewer.c
|
||||||
|
|
||||||
|
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)) && !defined(SIMULATOR)
|
||||||
|
wavplay.c
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef IRIVER_IFP7XX_SERIES /* Temporarily disable plugins for iFP7xx */
|
#ifndef IRIVER_IFP7XX_SERIES /* Temporarily disable plugins for iFP7xx */
|
||||||
dice.c
|
dice.c
|
||||||
#ifdef HAVE_LCD_BITMAP /* Not for the Player */
|
#ifdef HAVE_LCD_BITMAP /* Not for the Player */
|
||||||
|
|
|
@ -15,3 +15,4 @@ rsp,viewers/searchengine, 0e 11 11 31 7e 60
|
||||||
ss,rocks/sudoku, 55 55 55 55 55 55
|
ss,rocks/sudoku, 55 55 55 55 55 55
|
||||||
wav,viewers/wav2wv, 00 00 00 00 00 00
|
wav,viewers/wav2wv, 00 00 00 00 00 00
|
||||||
wav,viewers/mp3_encoder, 00 00 00 00 00 00
|
wav,viewers/mp3_encoder, 00 00 00 00 00 00
|
||||||
|
wav,viewers/wavplay,60 7F 05 35 3F 00
|
|
@ -142,7 +142,7 @@ int last_num_right_leds;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#define MAX_PEAK 0x7FFF
|
#define MAX_PEAK 0x8000
|
||||||
|
|
||||||
struct saved_settings {
|
struct saved_settings {
|
||||||
int meter_type;
|
int meter_type;
|
||||||
|
|
3680
apps/plugins/wavplay.c
Executable file
3680
apps/plugins/wavplay.c
Executable file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue