Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: jedione on August 25, 2019, 11:17:39 AM

Title: sound Q:
Post by: jedione on August 25, 2019, 11:17:39 AM
any one konw what the diffrence is with sound in the options

sound Vs ambient sound ?

and how would you separate the two in a theme

so the music can be low in the background,  with clicking and other sopunds at full 100%

thanks
Title: Re: sound Q:
Post by: jedione on August 25, 2019, 11:21:54 AM


<a name="ambient_sound" />
#### `fe.ambient_sound` ####

`fe.ambient_sound` is an instance of the `fe.Sound` class and can be used to
control the ambient sound track.




never seen any one use-sing this,    guess ill give it a try..
Title: Re: sound Q:
Post by: jedione on August 25, 2019, 11:38:47 AM


dont seem like it is working!  sucks...

local mysong = fe.ambient_sound("music/01_Phantasy.mp3");
mysong.loop = false;
mysong.playing = true;
Title: Re: sound Q:
Post by: rand0m on August 25, 2019, 11:27:25 PM


dont seem like it is working!  sucks...

local mysong = fe.ambient_sound("music/01_Phantasy.mp3");
mysong.loop = false;
mysong.playing = true;

Try it like this:
Code: [Select]
fe.ambient_sound.file_name = 01_Phantasy.mp3;
fe.ambient_sound.playing=true;
Title: Re: sound Q:
Post by: zpaolo11x on August 26, 2019, 01:48:19 AM
What is the difference between this code:

Code: [Select]
fe.ambient_sound.file_name = 01_Phantasy.mp3;
fe.ambient_sound.playing=true;

and this one?

Code: [Select]
local bgsound = fe.add_sound ("01_Phantasy.mp3")
bgsound.playing = true
Title: Re: sound Q:
Post by: jedione on August 26, 2019, 06:48:30 AM
Try it like this:

fe.ambient_sound.file_name = 01_Phantasy.mp3;
fe.ambient_sound.playing=true;

that through a error,  changed to this ,, and now working
so thank you for that qplayer :)

fe.ambient_sound.file_name = ("music/01_Phantasy.mp3");
fe.ambient_sound.playing=true;

i am using this in a new theme dont want the music to overpower...
Title: Re: sound Q:
Post by: jedione on August 26, 2019, 07:16:39 AM
well interesting enough when the ambient code is invoked,,,

it the will follow you back out of theme, to displays menu, and in to other themes...

somewhat of a master player for AM,   now i understand,,,   solved
 
Title: Re: sound Q:
Post by: rand0m on August 26, 2019, 09:53:46 AM
What is the difference between this code:

Code: [Select]
fe.ambient_sound.file_name = 01_Phantasy.mp3;
fe.ambient_sound.playing=true;

and this one?

Code: [Select]
local bgsound = fe.add_sound ("01_Phantasy.mp3")
bgsound.playing = true

No idea how they differ in execution. But AM does have a distinct call for ambient.sound so should have some differences as compared to normal sound.

ps: nvm as Jeidone pointed out its consistent and works throughout AM
Title: Re: sound Q:
Post by: jedione on September 08, 2019, 05:45:52 PM
solved thanks.....
Title: Re: sound Q:
Post by: Billyc666 on February 01, 2020, 06:29:30 AM
is there any way to have this play an m3u file that points to a radio staton