I need to play back audio clips from certain points. It’s working in the editor but not on the iPod touch. I initially thought it had to do with the code not being called, while the infamous hiccup occurs upon loading a new audio clip, but I don’t think so anymore. Anyone else able to use this?
Hmm, I don’t know. I’ll give it a try. That might be a solution for me for the audio hiccup in a loop I’ve been having a problem with. UT, I don’t care what the explanation of why the hiccup is there, having ~0.1 seconds of silence in a loop is a bug, especially when I can open the same file in an audio editor, hit Loop and it plays fine. But back on topic now, Jessy, I’ll give it a try here in a sec and let you know.
Edit: I couldn’t get this working quite right either.
don’t forget that the compression on the iphone might be a different one than on the editor.
Editor is OGG as unity on desktop
But the iphone does not accept ogg, so its either AAC or MP3 there. might be that the support for the other audiosource features has not been implemented yet, as the compressed audio support was added with the hotfix
This is a bummer. Without being able to play multiple compressed audio clips at a time, or being able to use this this property, I think my game sounds too stupid to release. I’ve gotten it ready over the past week, so I guess it will just have to sit on my hard drive until UT comes up with something. :x
Have you tried .time with an audio file without compression? It may not be what you need but it would be interesting to know and I could imagine that it’s hard for Unity to set the time if the MP3 is played back “somehow magically by the iPhone itself”.
I’m interested to know, too, although it won’t be useful to me for my current project. I’ll get back here with results soon.
Considering it’s a huge part of what the device was intended for, I hope not!!
…Later: Results are as expected. AudioSource.time works with uncompressed audio. I tried the time property with both .mp3 and .m4a (.aac) files, and neither responds. :x
File a bug please.
#79295
filed a few days ago.
Also see bug #90400 which seems like a semi related issue.
Does anyone know if this is resolved? I’ve run into the same issue with compressed audio AudioSource.time reporting “0”
at first, it seems to report it right, but before it reaches the end, it reports 0. So as I’m testing time against it’s length, it fails because it reports zero too early.
Thanks for any help,
John
I know this is an ancient thread and originally didn’t apply to 3.x but I got here from a search of the forums, so I’ll throw a note that audiosource.time = x does not work when the resource is compressed in memory. Change it to decompress on load and it will work.
v 3.3.0f4