Posts Tagged ‘AVAudioPlayer’

Yesterday was a bad day. Nothing worked, even the backup didn’t work anymore. When I pressed the pause button, the current scene was stopped, but suddenly all visited regions started to play… When I “unpaused” the current scene went on and all other audio was stopped. The second thing was a repeating (2x) error in […]


Today I tried the new structure with the audio handler. It’s possible now to play multiple audio files simultaneously with the AVAudioPlayer framework. It’s important that you convert your files to aif, caf etc… MP3s won’t work. AIF files can be huge, but when you convert your files with the IMA 4:1 format (*) a […]


Memory leaks

21Apr09

To optimize performance of the program I tried Instruments, a tool to locate memory leaks, object allocations etc… It is a very helpful tool, as it directs you directly where the memory leak occurs (theoretically). After a few testruns I discovered, that the NSXMLReader and the AVAudioPlayer leaks memory, but without an obvious reason. A […]


The program is running with following features: Startscreen / Mainscreen: There you have an overview about which file is played, your position, speed, etc.. It’s for debugging and will be replaced by a chic user interface. Button for GPS settings (switch to GPS screen) and a Button (+) to go to the selection screen for […]


The current version has some more bugfixes concerning loading progress of mediascapes, switching between scapes, playback functionality etc… I wrote a little test program which simulates different GPS coordinates to trigger different mediaregions. Now I can test playback behaviour when the “user” changes a region, which is currently reduced to a simple stop of the […]


To give a scene (CircleRegion) a smooth “edge” I implemented a variable fade out for the audiofiles. Each AudioObject has its individual fade duration which was set in mediascape before. So now, as the user leaves the CircleRegion, audio fades out with a linear shape (I’ll work on log shapes too). To give the functionality […]


…and it was quite tricky, even though it needs only a few lines of code to play audio files on the phone. I used the AVAudioPlayer which is in the AVFoundation framework (don’t forget to add it to your project, not just include….took me half an hour). Just look via Spotlight for it and import […]