Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Wav doesn't even loop seamlessly

Author
Message
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 1st Dec 2011 00:42 Edited at: 1st Dec 2011 01:32
So no MP3 seamless looping? Fine.
I only have short pieces of music in this game so I can put up with WAV for my looped music... but no - this doesn't even loop [seamlessly].

nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 1st Dec 2011 02:19 Edited at: 1st Dec 2011 21:03
Something that might help you solve this: There's a ~40K memory leak each time the WAV loops. At least with the WAV i`m using - 2203KB

[edit] KB!

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Dec 2011 20:47
2203 MB? Thats a pretty big wav file there, unless you mean kb. So far, I haven't had many real problems with sound playback, but I have seen several posts about similar issues. Have you tried a smaller file? The largest I have used so far is about 5mb. I haven't noticed any gap between loops as of yet, at least on windows. I haven't tested much on other devices.

nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 1st Dec 2011 21:02 Edited at: 1st Dec 2011 21:07
Sorry, yea. 2203Kb

This is on Windows, let alone a device...
I've edited the post

Don't forget - I'm only using WAV for looping music because of the MP3 issue. The music is only 25sec long...

The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 1st Dec 2011 21:21
You could try .ogg for looping purposes. Had problems in DBPro too with wave files, but .ogg files looped seamlessly.

Hope this helps.

nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 1st Dec 2011 21:24
@Slayer: Not really. OGG wouldn't be much use/guaranteed on other platforms.

As it happens, I tried to play WAV with playmusic, but it actually loops perfectly with playsound.

I'll still log the memory leak bug on the list though, but I can get away with playsound I think..

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Dec 2011 21:27
I think your best bet unless this is fixed is to work out exactly how long the clip is and use a timer to decide when to play the sound again. Audacity gives a pretty accurate sound length.


nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 1st Dec 2011 21:34
Playsound() works fine now I tried it
This issue was limited to playmusic()

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Dec 2011 09:33
WAVs should be played only as sounds, MP3's only as music.

It says in the help file:

LoadSound() - The filename of the sound file to load, must be a WAV file.
LoadMusic - Recommended to be MP3s, excepts Bada, where you should use OGGs

My signature is NOT a moderator plaything! Stop changing it!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Dec 2011 11:05
This issue is already logged as a bug.

Login to post a reply

Server time is: 2024-05-04 08:49:40
Your offset time is: 2024-05-04 08:49:40