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 / I think 1-99 IDs for Sound is not enough, there are more than 100 sound effects in "Fruit Warriors".

Author
Message
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 11th Jan 2012 03:50
Can AppGameKit support more IDs in the future versions? 1-99 is not enough. We need add more sound effects.

The Miracrea Games
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 11th Jan 2012 08:34
Can't you use "sound = load sound (flilename)?
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 11th Jan 2012 09:04
at the same time ,one sound only can play one time.

The Miracrea Games
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 11th Jan 2012 09:26
Halley, why don't you use FMOD?

Its very easy to set up in iOS and you won't have problems with mp3 seamless playback.
Let me know if you need help.
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 11th Jan 2012 14:34
Does FMOD work with Tier1? I'm guessing not....

Hi there. My name is Dug. I have just met you, and I love you.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 11th Jan 2012 16:10
I'll increase it to 300, it's just to limit the size of the array which is created at start up. But you can play a single sound file multiple times with PlaySound()
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 12th Jan 2012 08:11
@Paul, yes, but I can't play the single sound file multiple times as the same time.

The Miracrea Games
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Jan 2012 13:00
Paul, 300 should cover it. Any chance we can have individual sound volumes too (even cloned sounds)? That would really help for my Audio Sequencer I'm making...

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Jan 2012 13:15
Quote: "Any chance we can have individual sound volumes too (even cloned sounds)? That would really help for my Audio Sequencer I'm making"


You can have individual volumes but you can't adjust them once playing.

http://code.google.com/p/agk/issues/detail?id=94&q=volume

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Jan 2012 13:26
Sorry, that's what I meant Batvink, thanks!

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 12th Jan 2012 13:26
AnswerMan: No, only T2.
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 12th Jan 2012 14:12
What API does AppGameKit use when it comes to audio playback? There is surely something we can use that is much better than the current implementation for Tier 1.
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 12th Jan 2012 14:19
I agree. Being able to play multiple sounds would be fantastic for T1!

Hi there. My name is Dug. I have just met you, and I love you.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Jan 2012 15:07
Quote: "I can't play the single sound file multiple times as the same time"


You should be able to, every call of PlaySound(1) will create a new instance of sound 1 and start it.

Quote: "Any chance we can have individual sound volumes too"


Currently there is no way to reference a playing sound. In theory I could have PlaySound() return a unique ID that points to the that instance, but it would quickly become invalid once the sound finished playing.

Quote: "What API does AppGameKit use when it comes to audio playback"


On Windows it uses DirectSound.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Jan 2012 15:57
Quote: "Currently there is no way to reference a playing sound. In theory I could have PlaySound() return a unique ID that points to the that instance, but it would quickly become invalid once the sound finished playing."


Maybe it could replicate DBPro, with commands such as SOUND PLAYING(n) so you can check if it has ended. It is extremely useful to be able to queue sounds to play after one another, and to generally know the state of a sound so you can act on it.

Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 12th Jan 2012 16:08 Edited at: 12th Jan 2012 16:10
Quote: "Maybe it could replicate DBPro, with commands such as SOUND PLAYING(n) so you can check if it has ended. It is extremely useful to be able to queue sounds to play after one another, and to generally know the state of a sound so you can act on it."


Isn't that what these are for?

Quote: "
GetSoundsPlaying( iID )
GetSoundsInstances( iID )

Returns the number of instances of this sound ID that are currently playing or looping. This is exactly the same as GetSoundInstances().
"


Obtained these from the AppGameKit Documentation, haven't actually tried them though...

EDIT: Added definition.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Jan 2012 17:28
Almost...but a sound is the resource, it is an instance of this resource that actually plays. You'd need an ID to the instance. I used DBP as an example, but the abstraction is slightly different.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Jan 2012 19:26
Is there still a limit with iOS, giving only 32 simultaneous sound instances?

It's like that on the iPod at least, not sure if it's improved any since then.

Health, Ammo, and bacon and eggs!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Jan 2012 23:28
Quote: "commands such as SOUND PLAYING(n) so you can check if it has ended"


That's doable, something else for me to get around to

Quote: "Is there still a limit with iOS, giving only 32 simultaneous sound instances"


Not by my doing. But the iOS version uses OpenAL so maybe that or the iPod hardware has it's own limits.
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 13th Jan 2012 11:07
Is Windows actually using DSound or DShow?

DShow Filters can easily be controlled for volume, pan etc with full mixing.

-- Jim
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 14th Jan 2012 10:03
Quote: "I'll increase it to 300, it's just to limit the size of the array which is created at start up. But you can play a single sound file multiple times with PlaySound()"


Is this done for objects and other entities types too?

If so, if I am using 1 sound and 1 object and 1 particle, around 299*3 (or more depends on how you sized the vars) memory adresses are allocated but doing nothing special in the app. So why not make it dynamic? Just wondernig.



Cheers,

bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 20th Jan 2012 15:36
A linked list is slower and takes more memory than an array.


Login to post a reply

Server time is: 2024-11-23 00:14:49
Your offset time is: 2024-11-23 00:14:49