View Full Version : Help playing sound effects
jkaplan
02-07-2006, 07:50 PM
What is the most efficient way to play short custom sound effects using HME? I've been trying using 8,000 Hz signed 16-bit little endian mono PCM audio files, which is what is specified in the documentation. I'm creating the resource using createSound( byte[] buf ), but am not having any luck. Anyone have any sample code for doing this? Or am I trying to do the wrong thing here.
-j
jkaplan
02-08-2006, 05:42 PM
I seem to have figured out what the problem was. thanks.
cheezus
02-09-2006, 10:12 PM
I seem to have figured out what the problem was. thanks.
want to show us the snippets of non-working and magically working code? I bet others will run into that problem
jkaplan
02-14-2006, 03:32 PM
What I was doing originally was loading the sound bytes into memory and then creating a SoundResource using the createSound() method. After that I was calling setResource() on my view... which didn't work. I quickly figured out that all I needed was to call the play() method of the SoundResource that I created and it worked beautifully - no need to call setResource().
yzoer
07-28-2007, 12:32 AM
Hi!
Have you tried it on a real tivo? I get absolutely NOTHING yet it works fine on the simulator. Anyone ever got this?
According to the 'manual' you should be able to just do the following:
SoundResource snd;
snd = createSound ( "blah.snd" );
snd.play ();
Unfortunately, this won't work on a real tivo. Anyone got any ideas?
Thanks!
Yvo
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.