Rockbox Development > Starting Development and Compiling

Calling mp3_play_data API plugin to play mp3 file.

(1/1)

snoozydude:
Gidday

I would like to call mp3_play_data to play a mp3 file for a plugin I am hacking/writing but cannot workout if the first argument needs to be a pointer to a buffer containing  mp3 or sound data loaded with other plugin functions or can it just be string representing the directory/filename of a mp3 file
ie mp3_play_data("./rockbox/test.mp3",100,,)

I have searched the source code and cannot find other plugins that are calling mp3_play_data. A previous thread mentioned looking at test_codec (sic codec_test) but this has not clarified it for me.

Would anybody have some sample code which uses mp3_play_data?

cool_walking_:

--- Quote ---$ grep -iIr mp3_play_data * | grep -iv \.svn
apps/plugin.c:    mp3_play_data,
apps/plugin.h:    void (*mp3_play_data)(const unsigned char* start, int size, void (*get_more)(unsigned char** start, size_t* size));
apps/plugins/chip8.c:        rb->mp3_play_data(beep, sizeof(beep), callback);
apps/plugins/metronome.c:    rb->mp3_play_data(sound, sizeof(sound), callback);
apps/plugins/video.c:        rb->mp3_play_data(gBuf.pReadAudio + gFileHdr.audio_headersize,
apps/talk.c:        mp3_play_data(buf, sent, mp3_callback);
apps/voice_thread.c:void mp3_play_data(const unsigned char* start, int size,
apps/voice_thread.h:void mp3_play_data(const unsigned char* start, int size,
docs/PLUGIN_API:  void mp3_play_data(unsigned char* start, int size,
firmware/export/mp3_playback.h:void mp3_play_data(const unsigned char* start, int size,
firmware/mp3_playback.c:void mp3_play_data(const unsigned char* start, int size,
firmware/mp3_playback.c:void mp3_play_data(const unsigned char* start, int size,
firmware/mpeg.c:            mp3_play_data(audiobuf + audiobuf_read, last_dma_chunk_size, transfer_end);
firmware/mpeg.c:                    mp3_play_data(audiobuf + audiobuf_read, last_dma_chunk_size, transfer_end);
firmware/mpeg.c:                        mp3_play_data(audiobuf + audiobuf_read,

--- End quote ---

Navigation

[0] Message Index

Go to full version