Hello
I am new to gp2x developing so excuse me if you find my ideas stupid.
I need to play an wav|raw audio from another application output.
It looks like this:
This does not work. It reports: Error loading from datastream, then Tried to play NULL chunk and finally Unrecognized file type.
Should I try with Mix_QuickLoad_WAV? Can anybody help me with this?
Thanks
What I am mistaking here? Anyone have better solution how to do it?
I am new to gp2x developing so excuse me if you find my ideas stupid.
I need to play an wav|raw audio from another application output.
It looks like this:
Code:
Mix_OpenAudio(16000, AUDIO_S16, MIX_DEFAULT_CHANNELS, 128); // MIX_DEFAULT_FREQUENCY tried too
FILE *fp;
SDL_RWops *rw;
Mix_Chunk *wave_chunk;
fp = popen(appexecc_str(),"r");
Mix_Chunk=Mix_LoadWAV_RW(SDL_RWFromFP(fp, 0),1);
pclose(fp);
int channel;
if ((channel=Mix_PlayChannel(-1, wave_chunk, 0))==-1) { cout << " Error: " << Mix_GetError(); };
while(Mix_Playing(channel) != 0); { cout << " Playing "; WaitForKey(); }
This does not work. It reports: Error loading from datastream, then Tried to play NULL chunk and finally Unrecognized file type.
Should I try with Mix_QuickLoad_WAV? Can anybody help me with this?
Thanks
What I am mistaking here? Anyone have better solution how to do it?