Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

what is the best choice for playing sounds

Hi
i am trying to implement sounds in my project

i want to create one common class for sound, so that it can be used in different projects without much modification

we have different options to play sounds i.e,
AVAudioPlayer vs SimpleAudioEngine

which one is the best among these two players to play background sound and to play sounds effects.

By seeing some forums i came to know that, we cant easily find whether sound effects isplaying or not in "SimpleAudioEngine"
In AVAudioPlayer is there any method like "[[SimpleAudioEngine sharedEngine] preloadEffect:];" which is in SimpleAudioEngine
to preload sound files



Before posting this question i searched, but i didnt get proper answer.
which one among those two is having more flexibility, fast,easy, more control, etc.
Post edited by sandeep251986 on

Replies

  • The_RThe_R Posts: 30Registered Users
    sandeep251986;429661 said:
    Hi
    i am trying to implement sounds in my project

    i want to create one common class for sound, so that it can be used in different projects without much modification

    we have different options to play sounds i.e,
    AVAudioPlayer vs SimpleAudioEngine

    which one is the best among these two players to play background sound and to play sounds effects.

    By seeing some forums i came to know that, we cant easily find whether sound effects isplaying or not in "SimpleAudioEngine"
    In AVAudioPlayer is there any method like "[[SimpleAudioEngine sharedEngine] preloadEffect:];" which is in SimpleAudioEngine
    to preload sound files



    Before posting this question i searched, but i didnt get proper answer.
    which one among those two is having more flexibility, fast,easy, more control, etc.
    I use AVAudioPlayer for playing background music and OpenAL to play sound effects. I haven't heard of SimpleAudioEngine so I don't know anything about it.

    The main reason I chose to use AVAudioPlayer was because it lets you play .mp3 files more easily than OpenAL and the .caf files (which i use for OpenAL) tend to get really huge for background music files. For sound effects though a .caf is fine as sound effects are generally small.

    If you want to use OpenAL though you might have to spend some time understanding it. If you are used to OpenGL, then it should not be much of an issue as the two are very similar.
  • sandeep251986sandeep251986 Posts: 9New Users
    The_R;435363 said:
    I use AVAudioPlayer for playing background music and OpenAL to play sound effects. I haven't heard of SimpleAudioEngine so I don't know anything about it.

    The main reason I chose to use AVAudioPlayer was because it lets you play .mp3 files more easily than OpenAL and the .caf files (which i use for OpenAL) tend to get really huge for background music files. For sound effects though a .caf is fine as sound effects are generally small.

    If you want to use OpenAL though you might have to spend some time understanding it. If you are used to OpenGL, then it should not be much of an issue as the two are very similar.
    hi
    thank u The_R for your suggestion.

    in SimpleAudioEngine we can easily play background sounds and sound effects very easily.
    In this we can load all sound files initially itself (according to our need) to avoid some delay while start playing.
    The problem in this is, we don't get whether sound effect is playing or not.
    Apart from that problem i am very much comfort with SimpleAudioEngine

    Based on your help full suggestion, Now i will try with AVAudioPlayer, OpenAL for playing background & sound effects.
  • LevyMastLevyMast Posts: 97Registered Users
    sandeep251986;437855 said:
    hi
    thank u The_R for your suggestion.

    in SimpleAudioEngine we can easily play background sounds and sound effects very easily.
    In this we can load all sound files initially itself (according to our need) to avoid some delay while start playing.
    The problem in this is, we don't get whether sound effect is playing or not.
    Apart from that problem i am very much comfort with SimpleAudioEngine

    Based on your help full suggestion, Now i will try with AVAudioPlayer, OpenAL for playing background & sound effects.
    Maybe you should find out what iOS frameworks SimpleAudioEngine is based on.
    It may use the same ones, like OpenAL.
  • headkazeheadkaze Posts: 400Tutorial Authors, Registered Users
    The_R;435363 said:
    I use AVAudioPlayer for playing background music and OpenAL to play sound effects.
    Same. A good place to start would be iPhone Game Programming – Tutorial 9 – Sound Manager | 71² - iOS & Mac Developer
Sign In or Register to comment.