mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
General housekeeping: Make plugin buffer functions take size_t * instead of int * to match the parameter type of the buffer functions called in the core. Get rid of unsafe int * <==> size_t * casting. Use ssize_t where int was used and size_t where unsigned int was used in the buffer calls to not alter signedness in the plugins. No API version change since it should only be an issue for 64-bit sim builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13233 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cf6f4cf6f1
commit
26d242ae65
37 changed files with 52 additions and 51 deletions
|
@ -63,7 +63,7 @@ void sim_codec_close(void *pd);
|
||||||
extern unsigned char codecbuf[];
|
extern unsigned char codecbuf[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void* plugin_get_audio_buffer(int *buffer_size);
|
extern void* plugin_get_audio_buffer(size_t *buffer_size);
|
||||||
|
|
||||||
struct codec_api ci_voice;
|
struct codec_api ci_voice;
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@ struct codec_api {
|
||||||
int (*kbd_input)(char* buffer, int buflen);
|
int (*kbd_input)(char* buffer, int buflen);
|
||||||
struct tm* (*get_time)(void);
|
struct tm* (*get_time)(void);
|
||||||
int (*set_time)(const struct tm *tm);
|
int (*set_time)(const struct tm *tm);
|
||||||
void* (*plugin_get_audio_buffer)(int* buffer_size);
|
void* (*plugin_get_audio_buffer)(size_t* buffer_size);
|
||||||
int (*round_value_to_list32)(unsigned long value,
|
int (*round_value_to_list32)(unsigned long value,
|
||||||
const unsigned long list[],
|
const unsigned long list[],
|
||||||
int count,
|
int count,
|
||||||
|
|
|
@ -312,7 +312,7 @@ static void browse_cuesheet(struct cuesheet *cue)
|
||||||
|
|
||||||
bool display_cuesheet_content(char* filename)
|
bool display_cuesheet_content(char* filename)
|
||||||
{
|
{
|
||||||
unsigned int bufsize = 0;
|
size_t bufsize = 0;
|
||||||
struct cuesheet *cue = (struct cuesheet *)plugin_get_buffer(&bufsize);
|
struct cuesheet *cue = (struct cuesheet *)plugin_get_buffer(&bufsize);
|
||||||
if (!cue || bufsize < sizeof(struct cuesheet))
|
if (!cue || bufsize < sizeof(struct cuesheet))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -947,7 +947,7 @@ bool wps_data_load(struct wps_data *wps_data,
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* get buffer space from the plugin buffer */
|
/* get buffer space from the plugin buffer */
|
||||||
unsigned int buffersize = 0;
|
size_t buffersize = 0;
|
||||||
char *wps_buffer = (char *)plugin_get_buffer(&buffersize);
|
char *wps_buffer = (char *)plugin_get_buffer(&buffersize);
|
||||||
|
|
||||||
if (!wps_buffer)
|
if (!wps_buffer)
|
||||||
|
|
|
@ -597,7 +597,8 @@ static bool clipboard_copy(void)
|
||||||
/* Paste a file to a new directory. Will overwrite always. */
|
/* Paste a file to a new directory. Will overwrite always. */
|
||||||
static bool clipboard_pastefile(const char *src, const char *target, bool copy)
|
static bool clipboard_pastefile(const char *src, const char *target, bool copy)
|
||||||
{
|
{
|
||||||
int src_fd, target_fd, buffersize, size, bytesread, byteswritten;
|
int src_fd, target_fd;
|
||||||
|
ssize_t buffersize, size, bytesread, byteswritten;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
|
|
|
@ -276,7 +276,7 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer,
|
||||||
char* filename, bool reload)
|
char* filename, bool reload)
|
||||||
{
|
{
|
||||||
char* buffer;
|
char* buffer;
|
||||||
int buffer_size;
|
ssize_t buffer_size;
|
||||||
bool is_playing = audio_status() & AUDIO_STATUS_PLAY;
|
bool is_playing = audio_status() & AUDIO_STATUS_PLAY;
|
||||||
|
|
||||||
if (!filename && !is_playing)
|
if (!filename && !is_playing)
|
||||||
|
@ -294,7 +294,7 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer,
|
||||||
/* Viewing playlist on disk */
|
/* Viewing playlist on disk */
|
||||||
char *dir, *file, *temp_ptr;
|
char *dir, *file, *temp_ptr;
|
||||||
char *index_buffer = NULL;
|
char *index_buffer = NULL;
|
||||||
int index_buffer_size = 0;
|
ssize_t index_buffer_size = 0;
|
||||||
|
|
||||||
viewer->playlist = &temp_playlist;
|
viewer->playlist = &temp_playlist;
|
||||||
|
|
||||||
|
|
|
@ -667,7 +667,7 @@ int plugin_load(const char* plugin, void* parameter)
|
||||||
|
|
||||||
/* Returns a pointer to the portion of the plugin buffer that is not already
|
/* Returns a pointer to the portion of the plugin buffer that is not already
|
||||||
being used. If no plugin is loaded, returns the entire plugin buffer */
|
being used. If no plugin is loaded, returns the entire plugin buffer */
|
||||||
void* plugin_get_buffer(int* buffer_size)
|
void* plugin_get_buffer(size_t *buffer_size)
|
||||||
{
|
{
|
||||||
int buffer_pos;
|
int buffer_pos;
|
||||||
|
|
||||||
|
@ -692,10 +692,10 @@ void* plugin_get_buffer(int* buffer_size)
|
||||||
Playback gets stopped, to avoid conflicts.
|
Playback gets stopped, to avoid conflicts.
|
||||||
Talk buffer is stolen as well.
|
Talk buffer is stolen as well.
|
||||||
*/
|
*/
|
||||||
void* plugin_get_audio_buffer(int* buffer_size)
|
void* plugin_get_audio_buffer(size_t *buffer_size)
|
||||||
{
|
{
|
||||||
#if CONFIG_CODEC == SWCODEC
|
#if CONFIG_CODEC == SWCODEC
|
||||||
return audio_get_buffer(true, (size_t *)buffer_size);
|
return audio_get_buffer(true, buffer_size);
|
||||||
#else
|
#else
|
||||||
audio_stop();
|
audio_stop();
|
||||||
talk_buffer_steal(); /* we use the mp3 buffer, need to tell */
|
talk_buffer_steal(); /* we use the mp3 buffer, need to tell */
|
||||||
|
|
|
@ -545,8 +545,8 @@ struct plugin_api {
|
||||||
int (*kbd_input)(char* buffer, int buflen);
|
int (*kbd_input)(char* buffer, int buflen);
|
||||||
struct tm* (*get_time)(void);
|
struct tm* (*get_time)(void);
|
||||||
int (*set_time)(const struct tm *tm);
|
int (*set_time)(const struct tm *tm);
|
||||||
void* (*plugin_get_buffer)(int* buffer_size);
|
void* (*plugin_get_buffer)(size_t *buffer_size);
|
||||||
void* (*plugin_get_audio_buffer)(int* buffer_size);
|
void* (*plugin_get_audio_buffer)(size_t *buffer_size);
|
||||||
void (*plugin_tsr)(bool (*exit_callback)(bool reenter));
|
void (*plugin_tsr)(bool (*exit_callback)(bool reenter));
|
||||||
#ifdef IRAM_STEAL
|
#ifdef IRAM_STEAL
|
||||||
void (*plugin_iram_init)(char *iramstart, char *iramcopy, size_t iram_size,
|
void (*plugin_iram_init)(char *iramstart, char *iramcopy, size_t iram_size,
|
||||||
|
@ -653,8 +653,8 @@ extern unsigned char plugin_end_addr[];
|
||||||
#endif /* PLUGIN */
|
#endif /* PLUGIN */
|
||||||
|
|
||||||
int plugin_load(const char* plugin, void* parameter);
|
int plugin_load(const char* plugin, void* parameter);
|
||||||
void* plugin_get_buffer(int *buffer_size);
|
void* plugin_get_buffer(size_t *buffer_size);
|
||||||
void* plugin_get_audio_buffer(int *buffer_size);
|
void* plugin_get_audio_buffer(size_t *buffer_size);
|
||||||
#ifdef IRAM_STEAL
|
#ifdef IRAM_STEAL
|
||||||
void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size,
|
void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size,
|
||||||
char *iedata, size_t iedata_size);
|
char *iedata, size_t iedata_size);
|
||||||
|
|
|
@ -1143,7 +1143,7 @@ int main(void* parameter)
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
int button;
|
int button;
|
||||||
#endif
|
#endif
|
||||||
int stacksize;
|
ssize_t stacksize;
|
||||||
void* stack;
|
void* stack;
|
||||||
|
|
||||||
mbus_init(); /* init the M-Bus layer */
|
mbus_init(); /* init the M-Bus layer */
|
||||||
|
|
|
@ -552,7 +552,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
int t_disp = 0;
|
int t_disp = 0;
|
||||||
#ifdef USE_GSLIB
|
#ifdef USE_GSLIB
|
||||||
unsigned char *gbuf;
|
unsigned char *gbuf;
|
||||||
unsigned int gbuf_size = 0;
|
size_t gbuf_size = 0;
|
||||||
bool mode_switch = true;
|
bool mode_switch = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -62,10 +62,10 @@ void init_screen(void)
|
||||||
|
|
||||||
/* global vars for pl_malloc() */
|
/* global vars for pl_malloc() */
|
||||||
void *bufptr;
|
void *bufptr;
|
||||||
int bufleft;
|
ssize_t bufleft;
|
||||||
|
|
||||||
/* simple function to "allocate" memory in pluginbuffer. */
|
/* simple function to "allocate" memory in pluginbuffer. */
|
||||||
void *pl_malloc(int size)
|
void *pl_malloc(ssize_t size)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
ptr = bufptr;
|
ptr = bufptr;
|
||||||
|
|
|
@ -231,7 +231,7 @@ void Z_Close(void)
|
||||||
|
|
||||||
void Z_Init(void)
|
void Z_Init(void)
|
||||||
{
|
{
|
||||||
unsigned int size;
|
size_t size;
|
||||||
#ifdef INSTRUMENTED
|
#ifdef INSTRUMENTED
|
||||||
if (!(HEADER_SIZE >= sizeof(memblock_t) && MIN_RAM > LEAVE_ASIDE))
|
if (!(HEADER_SIZE >= sizeof(memblock_t) && MIN_RAM > LEAVE_ASIDE))
|
||||||
I_Error("Z_Init: Sanity check failed");
|
I_Error("Z_Init: Sanity check failed");
|
||||||
|
|
|
@ -37,7 +37,7 @@ static unsigned char cooling_map[LCD_HEIGHT][LCD_WIDTH];
|
||||||
|
|
||||||
#ifndef HAVE_LCD_COLOR
|
#ifndef HAVE_LCD_COLOR
|
||||||
static unsigned char *gbuf;
|
static unsigned char *gbuf;
|
||||||
static unsigned int gbuf_size = 0;
|
static size_t gbuf_size = 0;
|
||||||
static unsigned char draw_buffer[8*LCD_WIDTH];
|
static unsigned char draw_buffer[8*LCD_WIDTH];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -880,7 +880,7 @@ void DoUserDialog(char* filename)
|
||||||
char default_filename[32];
|
char default_filename[32];
|
||||||
int button;
|
int button;
|
||||||
int rc; /* generic return code */
|
int rc; /* generic return code */
|
||||||
int memleft;
|
ssize_t memleft;
|
||||||
tCheckROM result;
|
tCheckROM result;
|
||||||
bool is_romless;
|
bool is_romless;
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ PLUGIN_HEADER
|
||||||
static struct plugin_api* rb; /* global api struct pointer */
|
static struct plugin_api* rb; /* global api struct pointer */
|
||||||
static char pbuf[32]; /* global printf buffer */
|
static char pbuf[32]; /* global printf buffer */
|
||||||
static unsigned char *gbuf;
|
static unsigned char *gbuf;
|
||||||
static unsigned int gbuf_size = 0;
|
static size_t gbuf_size = 0;
|
||||||
|
|
||||||
/**************************** main function ********************************/
|
/**************************** main function ********************************/
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#ifndef SIMULATOR /* only for target */
|
#ifndef SIMULATOR /* only for target */
|
||||||
|
|
||||||
unsigned char *audiobuf;
|
unsigned char *audiobuf;
|
||||||
int audiobuf_size;
|
ssize_t audiobuf_size;
|
||||||
|
|
||||||
#if defined(IRIVER_H120)
|
#if defined(IRIVER_H120)
|
||||||
#define PLATFORM_ID ID_IRIVER_H100
|
#define PLATFORM_ID ID_IRIVER_H100
|
||||||
|
|
|
@ -27,7 +27,7 @@ PLUGIN_HEADER
|
||||||
|
|
||||||
static struct plugin_api* rb;
|
static struct plugin_api* rb;
|
||||||
|
|
||||||
int buf_size;
|
ssize_t buf_size;
|
||||||
static char *filename;
|
static char *filename;
|
||||||
static int readsize;
|
static int readsize;
|
||||||
static char *stringbuffer;
|
static char *stringbuffer;
|
||||||
|
|
|
@ -1874,7 +1874,7 @@ unsigned char* buf; /* up to here currently used by image(s) */
|
||||||
/* the remaining free part of the buffer for compressed+uncompressed images */
|
/* the remaining free part of the buffer for compressed+uncompressed images */
|
||||||
unsigned char* buf_images;
|
unsigned char* buf_images;
|
||||||
|
|
||||||
int buf_size, buf_images_size;
|
ssize_t buf_size, buf_images_size;
|
||||||
/* the root of the images, hereafter are decompresed ones */
|
/* the root of the images, hereafter are decompresed ones */
|
||||||
unsigned char* buf_root;
|
unsigned char* buf_root;
|
||||||
int root_size;
|
int root_size;
|
||||||
|
|
|
@ -47,7 +47,7 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter,
|
||||||
unsigned char *filename, unsigned char *name)
|
unsigned char *filename, unsigned char *name)
|
||||||
{
|
{
|
||||||
int fd, readsize;
|
int fd, readsize;
|
||||||
int audiobuf_size;
|
ssize_t audiobuf_size;
|
||||||
unsigned char *audiobuf;
|
unsigned char *audiobuf;
|
||||||
static struct plugin_header header;
|
static struct plugin_header header;
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ static unsigned max_iter;
|
||||||
|
|
||||||
#ifdef USEGSLIB
|
#ifdef USEGSLIB
|
||||||
static unsigned char *gbuf;
|
static unsigned char *gbuf;
|
||||||
static unsigned int gbuf_size = 0;
|
static size_t gbuf_size = 0;
|
||||||
static unsigned char imgbuffer[LCD_HEIGHT];
|
static unsigned char imgbuffer[LCD_HEIGHT];
|
||||||
#else
|
#else
|
||||||
static fb_data imgbuffer[LCD_HEIGHT];
|
static fb_data imgbuffer[LCD_HEIGHT];
|
||||||
|
|
|
@ -146,7 +146,7 @@ int midimain(void * filename);
|
||||||
void *alloc(int size)
|
void *alloc(int size)
|
||||||
{
|
{
|
||||||
static char *offset = NULL;
|
static char *offset = NULL;
|
||||||
static int totalSize = 0;
|
static ssize_t totalSize = 0;
|
||||||
char *ret;
|
char *ret;
|
||||||
|
|
||||||
int remainder = size % 4;
|
int remainder = size % 4;
|
||||||
|
@ -186,7 +186,7 @@ void *alloc(int size)
|
||||||
void *alloc(int size)
|
void *alloc(int size)
|
||||||
{
|
{
|
||||||
static char *offset = NULL;
|
static char *offset = NULL;
|
||||||
static int totalSize = 0;
|
static ssize_t totalSize = 0;
|
||||||
char *ret;
|
char *ret;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1607,7 +1607,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
{
|
{
|
||||||
int status = PLUGIN_ERROR; /* assume failure */
|
int status = PLUGIN_ERROR; /* assume failure */
|
||||||
void* audiobuf;
|
void* audiobuf;
|
||||||
int audiosize;
|
ssize_t audiosize;
|
||||||
int in_file;
|
int in_file;
|
||||||
uint8_t* buffer;
|
uint8_t* buffer;
|
||||||
size_t file_remaining;
|
size_t file_remaining;
|
||||||
|
@ -1652,7 +1652,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
buffer_size = audiosize - (PCMBUFFER_SIZE+PCMBUFFER_GUARD_SIZE+
|
buffer_size = audiosize - (PCMBUFFER_SIZE+PCMBUFFER_GUARD_SIZE+
|
||||||
MPABUF_SIZE+LIBMPEG2BUFFER_SIZE);
|
MPABUF_SIZE+LIBMPEG2BUFFER_SIZE);
|
||||||
|
|
||||||
DEBUGF("audiosize=%d, buffer_size=%ld\n",audiosize,buffer_size);
|
DEBUGF("audiosize=%ld, buffer_size=%ld\n",audiosize,buffer_size);
|
||||||
buffer = mpeg2_malloc(buffer_size,-1);
|
buffer = mpeg2_malloc(buffer_size,-1);
|
||||||
|
|
||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
|
|
|
@ -45,7 +45,7 @@ static int redphase = 0, greenphase = 50, bluephase = 100;
|
||||||
static unsigned char colours[256]; /* Smooth transition of shades */
|
static unsigned char colours[256]; /* Smooth transition of shades */
|
||||||
static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */
|
static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */
|
||||||
static unsigned char *gbuf;
|
static unsigned char *gbuf;
|
||||||
static unsigned int gbuf_size = 0;
|
static size_t gbuf_size = 0;
|
||||||
#endif
|
#endif
|
||||||
static unsigned char sp1, sp2, sp3, sp4; /* Speed of plasma */
|
static unsigned char sp1, sp2, sp3, sp4; /* Speed of plasma */
|
||||||
static int plasma_frequency;
|
static int plasma_frequency;
|
||||||
|
|
|
@ -27,7 +27,7 @@ static int dirs_count;
|
||||||
static int lasttick;
|
static int lasttick;
|
||||||
#define RFA_FILE ROCKBOX_DIR "/folder_advance_list.dat"
|
#define RFA_FILE ROCKBOX_DIR "/folder_advance_list.dat"
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
int buffer_size;
|
ssize_t buffer_size;
|
||||||
struct file_format {
|
struct file_format {
|
||||||
int count;
|
int count;
|
||||||
char folder[][MAX_PATH];
|
char folder[][MAX_PATH];
|
||||||
|
|
|
@ -645,7 +645,7 @@ void DoUserDialog(char* filename)
|
||||||
int rc; /* generic return code */
|
int rc; /* generic return code */
|
||||||
UINT32 space, aligned_size, true_size;
|
UINT32 space, aligned_size, true_size;
|
||||||
UINT8* pos;
|
UINT8* pos;
|
||||||
int memleft;
|
ssize_t memleft;
|
||||||
UINT32 crc;
|
UINT32 crc;
|
||||||
bool show_greet = false;
|
bool show_greet = false;
|
||||||
|
|
||||||
|
@ -849,7 +849,7 @@ void DoUserDialog(char* filename)
|
||||||
int rc; /* generic return code */
|
int rc; /* generic return code */
|
||||||
UINT32 space, aligned_size, true_size;
|
UINT32 space, aligned_size, true_size;
|
||||||
UINT8* pos;
|
UINT8* pos;
|
||||||
int memleft;
|
ssize_t memleft;
|
||||||
UINT32 crc;
|
UINT32 crc;
|
||||||
|
|
||||||
/* this can only work if Rockbox runs in DRAM, not flash ROM */
|
/* this can only work if Rockbox runs in DRAM, not flash ROM */
|
||||||
|
|
|
@ -44,7 +44,7 @@ struct options options;
|
||||||
|
|
||||||
void *audio_bufferbase;
|
void *audio_bufferbase;
|
||||||
void *audio_bufferpointer;
|
void *audio_bufferpointer;
|
||||||
unsigned int audio_buffer_free;
|
size_t audio_buffer_free;
|
||||||
|
|
||||||
void *my_malloc(size_t size)
|
void *my_malloc(size_t size)
|
||||||
{
|
{
|
||||||
|
@ -194,13 +194,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
if(rb->audio_status())
|
if(rb->audio_status())
|
||||||
{
|
{
|
||||||
audio_bufferbase = audio_bufferpointer
|
audio_bufferbase = audio_bufferpointer
|
||||||
= rb->plugin_get_buffer((int *)&audio_buffer_free);
|
= rb->plugin_get_buffer(&audio_buffer_free);
|
||||||
plugbuf=true;
|
plugbuf=true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
audio_bufferbase = audio_bufferpointer
|
audio_bufferbase = audio_bufferpointer
|
||||||
= rb->plugin_get_audio_buffer((int *)&audio_buffer_free);
|
= rb->plugin_get_audio_buffer(&audio_buffer_free);
|
||||||
plugbuf=false;
|
plugbuf=false;
|
||||||
}
|
}
|
||||||
#if MEM <= 8 && !defined(SIMULATOR)
|
#if MEM <= 8 && !defined(SIMULATOR)
|
||||||
|
|
|
@ -25,7 +25,7 @@ PLUGIN_HEADER
|
||||||
|
|
||||||
void *audio_bufferbase;
|
void *audio_bufferbase;
|
||||||
void *audio_bufferpointer;
|
void *audio_bufferpointer;
|
||||||
unsigned int audio_buffer_free;
|
size_t audio_buffer_free;
|
||||||
struct plugin_api* rb;
|
struct plugin_api* rb;
|
||||||
int w, h, y;
|
int w, h, y;
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ int load_all_levels(void)
|
||||||
{
|
{
|
||||||
int linecnt = 0;
|
int linecnt = 0;
|
||||||
int fd;
|
int fd;
|
||||||
int size;
|
ssize_t size;
|
||||||
char buf[64]; /* Larger than WIDTH, to allow for whitespace after the
|
char buf[64]; /* Larger than WIDTH, to allow for whitespace after the
|
||||||
lines */
|
lines */
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ PLUGIN_HEADER
|
||||||
|
|
||||||
static struct plugin_api* rb;
|
static struct plugin_api* rb;
|
||||||
|
|
||||||
int buf_size;
|
ssize_t buf_size;
|
||||||
static char *filename;
|
static char *filename;
|
||||||
static int num_entries;
|
static int num_entries;
|
||||||
static char **pointers;
|
static char **pointers;
|
||||||
|
|
|
@ -573,7 +573,7 @@ static int copy_file(
|
||||||
unsigned char *buffer;
|
unsigned char *buffer;
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
ssize_t bytes_read = 1; /* ensure the for loop is executed */
|
ssize_t bytes_read = 1; /* ensure the for loop is executed */
|
||||||
unsigned int buffer_size;
|
size_t buffer_size;
|
||||||
buffer = rb->plugin_get_buffer(&buffer_size);
|
buffer = rb->plugin_get_buffer(&buffer_size);
|
||||||
|
|
||||||
for (i = 0; i < bytes && bytes_read > 0; i += bytes_read)
|
for (i = 0; i < bytes && bytes_read > 0; i += bytes_read)
|
||||||
|
|
|
@ -32,7 +32,7 @@ PLUGIN_HEADER
|
||||||
|
|
||||||
static struct plugin_api* rb;
|
static struct plugin_api* rb;
|
||||||
static unsigned char* audiobuf;
|
static unsigned char* audiobuf;
|
||||||
static int audiobufsize;
|
static ssize_t audiobufsize;
|
||||||
|
|
||||||
static unsigned short frnd_buffer;
|
static unsigned short frnd_buffer;
|
||||||
static int line = 0;
|
static int line = 0;
|
||||||
|
|
|
@ -22,8 +22,8 @@ PLUGIN_HEADER
|
||||||
|
|
||||||
static struct plugin_api* rb;
|
static struct plugin_api* rb;
|
||||||
|
|
||||||
static char *audiobuf;
|
static char *audiobuf;
|
||||||
static int audiobuflen;
|
static ssize_t audiobuflen;
|
||||||
|
|
||||||
static void xingupdate(int percent)
|
static void xingupdate(int percent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,7 +38,7 @@ void *memcpy(void *dest, const void *src, size_t n) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *audiobuf;
|
static char *audiobuf;
|
||||||
static int audiobuflen;
|
static ssize_t audiobuflen;
|
||||||
|
|
||||||
static struct wav_header {
|
static struct wav_header {
|
||||||
char ckID [4]; /* RIFF chuck header */
|
char ckID [4]; /* RIFF chuck header */
|
||||||
|
|
|
@ -3138,7 +3138,7 @@ void dma_end_isr(void) __attribute__((interrupt_handler));
|
||||||
static struct plugin_api *rb;
|
static struct plugin_api *rb;
|
||||||
|
|
||||||
static unsigned char *aud_buf;
|
static unsigned char *aud_buf;
|
||||||
static int aud_size;
|
static ssize_t aud_size;
|
||||||
static unsigned char *plug_buf;
|
static unsigned char *plug_buf;
|
||||||
|
|
||||||
static void (*pcm_callback)(unsigned char**, int*) = NULL;
|
static void (*pcm_callback)(unsigned char**, int*) = NULL;
|
||||||
|
@ -3649,7 +3649,7 @@ int play_file(char* filename)
|
||||||
/* plugin entry point */
|
/* plugin entry point */
|
||||||
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
{
|
{
|
||||||
int buf_size;
|
ssize_t buf_size;
|
||||||
|
|
||||||
rb = api;
|
rb = api;
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ struct peakstruct
|
||||||
|
|
||||||
/* global vars */
|
/* global vars */
|
||||||
static char *audiobuf;
|
static char *audiobuf;
|
||||||
static int audiobuflen;
|
static ssize_t audiobuflen;
|
||||||
static uint32_t mempeakcount = 0;
|
static uint32_t mempeakcount = 0;
|
||||||
static uint32_t filepeakcount = 0;
|
static uint32_t filepeakcount = 0;
|
||||||
static uint32_t fppmp = 0; /* file peaks per mem peaks */
|
static uint32_t fppmp = 0; /* file peaks per mem peaks */
|
||||||
|
|
|
@ -19,7 +19,7 @@ int my_putc(char c , int fd){
|
||||||
void *my_malloc(size_t size)
|
void *my_malloc(size_t size)
|
||||||
{
|
{
|
||||||
static char *offset = NULL;
|
static char *offset = NULL;
|
||||||
static int totalSize = 0;
|
static ssize_t totalSize = 0;
|
||||||
char *ret;
|
char *ret;
|
||||||
|
|
||||||
int remainder = size % 4;
|
int remainder = size % 4;
|
||||||
|
|
|
@ -52,7 +52,7 @@ static int previous_state;
|
||||||
|
|
||||||
#ifdef USE_GRAY
|
#ifdef USE_GRAY
|
||||||
static unsigned char *gbuf;
|
static unsigned char *gbuf;
|
||||||
static unsigned int gbuf_size = 0;
|
static size_t gbuf_size = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
long video_frames IBSS_ATTR = 0 ;
|
long video_frames IBSS_ATTR = 0 ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue