Howdy, Stranger!

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

Custom Audio Files

edited May 2012 in Suggestions Posts: 141

Are you planning on adding support for custom audio files, in the same way we can with graphics now?

I would love to have a play(fileName) command that would let me play MP3s (and other types of sound files).

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,054

    Yes, it seems like a good feature to have, and now that there is Dropbox support it should be fairly easy to get them into Codea.

  • Posts: 176

    wav support would be wonderful.

  • Posts: 141

    Out of the box iOS supports MP3, Uncompressed WAV, Uncompressed AIF, and AAC (aka MP4a files) in either AAC-LC or HE-AAC profiles.

    So Codea should be able to support all of those as soon as they add the ability to play a file

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @JockM that depends on what audio system is used to play them. We don't use the hardware accelerated path — it's more useful for music playback than for game audio. We use an OpenAL based system.

  • Posts: 4

    Support for Audio copy/paste would be great.

  • Posts: 115

    Core MIDI as well as WIST (ala Bluetooth) would be right up my alley too.

  • edited May 2012 Posts: 580

    What about using something like Cocos Denshion for the audio? It's built on top of OpenAL, and it also has hardware support for music. I typically use the hardware audio playback for background music in my games, and play all of the SFX using software.

  • Posts: 141

    And as an add on I would love some callbacks and/or properties to pause, change the position, and get the position of an audio file.

    In my current project I want to be able to play some background music for as long as the user is using the app. So loop the audio I have a Timer class that plays the sound again after the appropriate amount of time. This works but it is less than ideal, and is somewhat fragile.

  • GibGib
    Posts: 59

    @Simeon what is the status of this feature? Any eta?

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @Gib music and sound features are finished (apart from some minor bug fixes). However, some major parts of Codea are being re-written for iOS 7. I'd like the next release to be iOS 7 native, so the new features will have to wait a bit longer.

  • GibGib
    Posts: 59

    oh nice! I just want you know know how you have gotten me back into trying to finish my game with Codea. I guess and old dog can learn new tricks, thanks for that ;). This SDK feels soooo....right ;)

  • edited October 2013 Posts: 10

    Yup. Looking forward to that!

  • edited October 2013 Posts: 355

    @simeon the next codea update will support for ipad 1??
    i bealive not but i nedd ask u .
    thanks

  • Posts: 2,820

    @Luismi - I believe it will be hard for them to manage iOS 5,6, and 7 at this point, but I'm not going to put words in their mouths. It should be possible for them to still support iOS 5.

  • Posts: 355

    thanks @zoyt

  • Posts: 2,042

    Any chance of video playback coming soon?

  • Posts: 2,820

    @JakAttak - It's not easy to add video to an OpenGL frame. Apple does not provide a method for easily playing a video. Simeon would have to write his own displayer.
    This is the same reason text rendering was not initially included in Codea: There is no easy way to draw text into an OpenGL frame. You have to rasterize it, then draw it. You can see this when you attempt to draw a piece of text. The first frame you draw the text, your frame rate will drop temporarily while Codea rasterizes the text.
    Anyways, that's a little off topic. Sorry.

Sign In or Register to comment.