Skip to main content

Button sound on PS3

6 replies [Last post]
flat8
Offline
Joined: 2008-02-24

Hi All,

I've made a sound.bdmv using soundgen.jar, then
wrote a code using examples from HD Cookbook like below

-----------------------------------------------------------------
try{
BDLocator bdl = new BDLocator("SOUND:00");
MediaLocator ml = new MediaLocator(bdl);
HSound hs = new HSound();
hs.load(ml);
}catch(Exception e){
System.out.println(e.getMessage());
}
-----------------------------------------------------------------

It seems to work well on PowerDVD, but PS3 throws IOException at "hd.load(ml)".
It says "can't open connection to bd protocol". Sound files are wave format 48KHz, 16bit, stereo.
Has anyone has a clue about this?
Any helps are greatly appreciated.

Thanks in advance.

flat8

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
maciejka79
Offline
Joined: 2008-02-07

this is what i have:

public void playSound(String sound)
{
try
{
// Create a MediaLocator for the sound.
javax.media.MediaLocator locator =
new javax.media.MediaLocator(sound);
// Create a JMF Player for the sound.
Player soundPlayer = Manager.createPlayer(locator);
if (soundPlayer != null)
{
// Play the sound.
soundPlayer.start();
}
}
catch (Exception exception)
{}
}

and then i call it::
playSound("bd://SOUND:01");

Message was edited by: maciejka79

Joe Rice

Hi -

I don't think that fits any of the BDLocator constructors - have you
tried with a URL? This might do the trick:

BDLocator bdl = new BDLocator("bd://SOUND:00");

Cheers,
Joe

On Aug 24, 2008, at 8:58 PM, bd-j-dev@mobileandembedded.org wrote:

> Hi All,
>
> I've made a sound.bdmv using soundgen.jar, then
> wrote a code using examples from HD Cookbook like below
>
> -----------------------------------------------------------------
> try{
> BDLocator bdl = new BDLocator("SOUND:00");
> MediaLocator ml = new MediaLocator(bdl);
> HSound hs = new HSound();
> hs.load(ml);
> }catch(Exception e){
> System.out.println(e.getMessage());
> }
> -----------------------------------------------------------------
>
> It seems to work well on PowerDVD, but PS3 throws IOException at
> "hd.load(ml)".
> It says "can't open connection to bd protocol". Sound files are wave
> format 48KHz, 16bit, stereo.
> Has anyone has a clue about this?
> Any helps are greatly appreciated.
>
> Thanks in advance.
>
> flat8
> [Message sent by forum member 'flat8' (flat8)]
>
> http://forums.java.net/jive/thread.jspa?messageID=295055
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Heihachirou NISHIMURA

Hi Joe,

Thank you for your prompt reply.
Sorry, I made a mistake.
The code I wrote is following.

try{
BDLocator bdl = new BDLocator("bd://SOUND:00");
MediaLocator ml = new MediaLocator(bdl);
HSound hs = new HSound();
hs.load(ml);
}catch(Exception e){
System.out.println(e.getMessage());
}

flat8
--
Heihachiro Nishimura
heihachirou@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

flat8
Offline
Joined: 2008-02-24

Sorry, I made a mistake.
Correct code is below,

try{
BDLocator bdl = new BDLocator("bd://SOUND:00");
MediaLocator ml = new MediaLocator(bdl);
HSound hs = new HSound();
hs.load(ml);
}catch(Exception e){
System.out.println(e.getMessage());
}

Thanks,

flat8

Joe Rice

We've generally used JMF players for interactive audio with
BDLocators, so take the below with a grain of salt, and listen to
anyone else with real world experience instead. ;)

Looking at Part 3-2 G.2.2 in the BD-ROM spec, I think it could be read
that HSounds may not be required to support bd:// URLs, and may just
accept file references to a .bdmv containing a single sound. For using
sound.bdmv, you may need to use a JMF player.

Cheers,
Joe

On Aug 24, 2008, at 9:12 PM, bd-j-dev@mobileandembedded.org wrote:

> Sorry, I made a mistake.
> Correct code is below,
>
> try{
> BDLocator bdl = new BDLocator("bd://SOUND:00");
> MediaLocator ml = new MediaLocator(bdl);
> HSound hs = new HSound();
> hs.load(ml);
> }catch(Exception e){
> System.out.println(e.getMessage());
> }
>
> Thanks,
>
> flat8
> [Message sent by forum member 'flat8' (flat8)]
>
> http://forums.java.net/jive/thread.jspa?messageID=295056
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Heihachirou NISHIMURA

Hi Joe,

I've decided to use JMF instaed of HSound for button sound too.

try{
BDLocator bdl = new BDLocator("bd://SOUND:00");
MediaLocator ml = new MediaLocator(bdl);
player = Manager.createPlayer(ml);
}catch(MalformedURLException e){
}catch(IOException e){
}catch(NoPlayerException e){
}catch(InvalidLocatorException e){
}

--
Heihachiro Nishimura
heihachirou@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net