|
Audio sounds weird |
julian smit
Member #13,064
July 2011
|
Hey everyone, I'm working on some easy games and came to the point i wanted to add music to the game, i made 2 functions, one for sound effects using (.wav) Here's the code i'm using now: 1song = al_load_audio_stream(sfx, 1, 1024 * 2);
2al_set_audio_stream_playmode(song, ALLEGRO_PLAYMODE_ONCE);
3al_attach_audio_stream_to_mixer(song, al_get_default_mixer());
Thanks for the support so far! |
Trent Gamblin
Member #261
April 2000
|
Define sounds horrible. Is it breaking up because I would recommend at least two 4k buffers.
|
julian smit
Member #13,064
July 2011
|
yeah, with "sounds weird" i mean a bit breaking up, i tried to make it sound better but this was the best i could get it. now my question would be how many buffers and how many samples should i need to load the song.
|
weapon_S
Member #7,859
October 2006
|
So you have tried: song = al_load_audio_stream(sfx, 2, 1024 * 4); |
julian smit
Member #13,064
July 2011
|
yes, i've tried that and it sounds actually exactly the same, for other programs, i've never tested that. |
Elias
Member #358
May 2000
|
Does non-streaming sounds also break? (In which case the disk buffer used in streaming wouldn't be the cause.) -- |
julian smit
Member #13,064
July 2011
|
non-streaming sounds are working fine. |
Elias
Member #358
May 2000
|
Does it also sound broken when you play the audio file with ex_stream_file? -- |
julian smit
Member #13,064
July 2011
|
It's fixed now, i forgot the event, stupid of me. but thanks for the support . |
|