How to play audio in ITGB? and what format dose this engine?
by Bruno Morin · in iTorque 2D · 03/26/2009 (10:31 am) · 15 replies
How to play audio in ITGB? and what format dose this engine?..
Hello..
Could you explain how to play audio?..sorry, I have no idea to play sound even if I have read some other forums.
I want to play sound when object crashes against other object..
and and what format dose this engine?..
only ogg(?? I never hear it --;) wav??
Thank you.
Won.
Hello..
Could you explain how to play audio?..sorry, I have no idea to play sound even if I have read some other forums.
I want to play sound when object crashes against other object..
and and what format dose this engine?..
only ogg(?? I never hear it --;) wav??
Thank you.
Won.
#2
I've noticed that the answers to your inquiries (as with your other threads) are mostly answered with the documentation that comes with the unzipped iTGB folder. Check the root directory, under "documentation". View the index with your favorite browser.
Make sure to go through all the tutorials included with the documentation, as I have. You will learn how to use the basic "core" functionality of TGB, and in turn, iTGB.
Regards,
Ronald
03/26/2009 (11:53 am)
Bruno,I've noticed that the answers to your inquiries (as with your other threads) are mostly answered with the documentation that comes with the unzipped iTGB folder. Check the root directory, under "documentation". View the index with your favorite browser.
Make sure to go through all the tutorials included with the documentation, as I have. You will learn how to use the basic "core" functionality of TGB, and in turn, iTGB.
Regards,
Ronald
#3
I will do try more and ask forum next time.. ^^;
Thank you.again....
you guys help me alot.....
03/27/2009 (1:52 pm)
thank you I found sound script in iPhoneTest and BehaviorShooter.I will do try more and ask forum next time.. ^^;
Thank you.again....
you guys help me alot.....
#4
03/29/2009 (5:08 am)
Good luck
#5
Just that I’ve been having some audio problems (the game crashes) when I try to use OGG, but it works fine with WAV files, it’s not a big issue, just that I’m trying to convert a TGB project over to iTGB.
Thanks,
Mike.
03/31/2009 (10:45 am)
So am I right in thinking that iTGB can not use the OGG format now and only WAV and MP3?Just that I’ve been having some audio problems (the game crashes) when I try to use OGG, but it works fine with WAV files, it’s not a big issue, just that I’m trying to convert a TGB project over to iTGB.
Thanks,
Mike.
#6
03/31/2009 (10:50 am)
Yes, that's correct.
#7
03/31/2009 (11:20 am)
I think right now it is only WAV - MP3 support won't be in until 1.2 is released.
#8
OGG support I can get by with but it's a shame about the lack of MP3 support. Well I guess that's one of the reasons for updating the app when I finally get it released on the App Store =?
03/31/2009 (11:49 am)
Thanks Mat and Geoff for your help. That explains a lot.OGG support I can get by with but it's a shame about the lack of MP3 support. Well I guess that's one of the reasons for updating the app when I finally get it released on the App Store =?
#9
03/31/2009 (1:35 pm)
If you mean Ogg Vorbis (Ogg is just the container for a number of sound and video formats), don't bother just yet. On my iPod touch, which is the superfast second generation, Vorbis decoding+playing is eating 25% CPU before ARM optimisations. I'm looking at reducing this, but it is not at all ready for game use. MP3 and AAC are decoded with a dedicated chip, while WAV is pure IO operations, so they're basically free.
#10
I´m getting this message when trying to use an MP3 file:
"ResourceObject::construct: NULL resource create function for 'SSBGM1.mp3"
And so the sound is not properly played.
What could be wrong?
Thanks,
Mike.
05/09/2009 (2:05 pm)
Mat,I´m getting this message when trying to use an MP3 file:
"ResourceObject::construct: NULL resource create function for 'SSBGM1.mp3"
And so the sound is not properly played.
What could be wrong?
Thanks,
Mike.
#11
I'll try to get a new section into the docs talking about this. The above code is found in the BehaviorShooter example game. You want to focus on the $musicStreamFile, $musicStreamHandle, playiPhoneAudioStream, and stopiPhoneAudioStream.
05/09/2009 (7:33 pm)
Try this out:$musicStreamHandle = 0;
$musicStreamFile = "~/data/audio/StreamSong.mp3";
$musicStreamToggle = false;
function oniPhoneTouchDown( %touchCount, %touchX, %touchY ) {
if( %touchCount <= 1 ) {
return;
}
if( $musicStreamHandle == 0 ) {
$musicStreamHandle = startiPhoneAudioStream( $musicStreamFile );
echo( "starting" SPC $musicStreamFile SPC "handle:" SPC $musicStreamHandle );
} else {
stopiPhoneAudioStream( $musicStreamHandle );
echo( "Killing" SPC $musicStreamFile SPC "handle:" SPC $musicStreamHandle );
$musicStreamHandle = 0;
}
}I'll try to get a new section into the docs talking about this. The above code is found in the BehaviorShooter example game. You want to focus on the $musicStreamFile, $musicStreamHandle, playiPhoneAudioStream, and stopiPhoneAudioStream.
#12
05/10/2009 (7:35 am)
Thanks Mat, that new section will be great.
#13
I´ve been developing my game taking TGB 1.7.4 docs as reference, but the truth is that specific docs for iTGB specific methods are required. Is there a place to get such docs to read about stuff that has to do with the iPhone platform? I talk about stuff just like oniPhoneTouchDown()...
Thanks,
Mike
05/11/2009 (8:08 am)
Mat,I´ve been developing my game taking TGB 1.7.4 docs as reference, but the truth is that specific docs for iTGB specific methods are required. Is there a place to get such docs to read about stuff that has to do with the iPhone platform? I talk about stuff just like oniPhoneTouchDown()...
Thanks,
Mike
#14
The specific docs will have to be updated tonight, unfortunately. I'll be releasing tiny updates as I go since it is night time work for me. I will be out of town from the 14th to the 26th, so you will not hear anything about iTGB from me during that time.
05/11/2009 (11:07 am)
<===== Mich, btwThe specific docs will have to be updated tonight, unfortunately. I'll be releasing tiny updates as I go since it is night time work for me. I will be out of town from the 14th to the 26th, so you will not hear anything about iTGB from me during that time.
Torque 3D Owner Mat Valadez
Default Studio Name
Check out iPhoneTest and BehaviorShooter for examples.