Sound File Type?

Hello. So if codea treats mp3 files as music, then what file type is used for sound?

@Goatboy76 generally you use mono .wav files for sound effects. This allows for positional audio, fast loading and playback. Another popular format on iOS is mono .caf files (core audio format).

mp3s aren’t great for sound effects because they have to be decompressed.

@Simeon Thanks for the info.

If the sound plays the demo in the asset selector then should it play correctly when called in the program?

it should, they use the same mechanism. Is it not?

@Simeon Im having some trouble with a .wav file that plays fine in the asset selector but I can’t get to play when the program runs. When I replace the sound with another dropbox .wav file it plays fine, so it must be something with that file.

Are you able to create an issue on the issue tracker? Perhaps you could attach the problematic file as well? Then I could take a look.

(If you can’t attach files to the issue tracker then you can email it to me,

@Simeon I made the issue as an anyomous user and included the file. Heres a program that demonstrats the bug. You need the file from the issue tracker.

Issue Tracker:

-- jhvc

-- Use this function to perform your initial setup
function setup()
    print("Hello World!")

-- This function gets called once every frame
function draw()
    -- This sets a dark background color 
    background(40, 40, 50)

    -- This sets the line thickness

    -- Do your drawing here

function touched(touch)
    if touch.state == BEGAN then

@Goatboy76 Could you give us the wav file to test it? (I don’t see it on the report on the issue tracker)

@SkyTheCoder Its attached now.

@Goatboy76, I’m guessing the problem is the .com in the file name. Try saving it under a new name.

EDIT: tested and confirmed. same file, different name works fine.

@JakAttak Your right, that worked, thanks.

@Simeon So the sound function got the wrong, .com, extension while what the asset selector used got the correct .wav?