|
How to read OGG's from datafiles with AllegroOgg |
Luis Garcia Ventura
Member #5,392
January 2005
|
Hi! I'm a begginer who's trying to read OGG's from my datafile using AllegroOgg, but I can't do it I'm using AllegroOgg because I can't compile AllOgg, and I only want to use OGG sound . When reading from disk, I have no problem and it works 100% ok playing the sound:
But, when I try to read it from a datafile, I obtain no result: install_sound (DIGI_AUTODETECT,MIDI_NONE,NULL); DATAFILE *MyDataFile = load_datafile ("mydat.dat"); ActFx = alogg_create_ogg_from_buffer (MyDataFile[conv].dat), 20786); alogg_play_ex_ogg(ActFx, 65536, 255, 127, 1000, 0); while( !keypressed() && alogg_is_playing_ogg(ActFx) ) { rest(100); } alogg_destroy_ogg (ActFx); 20786 is the file lenght. If I check ActFx pointer after alogg_create_ogg_from_buffer is not NULL, and allog_play_ex_ogg returns ALLOG_OK, but nothing is played. Can you help me? Thank you very much EDITED: I've still trying, and, finally, I've obtained the result wanted I've forgot the alogg_start_autopoll_ogg(ActFx, 25); call. I think I don't need to improve my PC's memory, but mine |
|