|
From: manny k. <man...@gm...> - 2016-09-28 20:15:12
|
Also, as I looked up SoundConstants class,
public final static String SND_ROVER_PARKED = "";
do we intentionally want no ogg file for the following case when a rover is
parked ?
It could play a "zzzz" sound effect that signifies the vehicle is "asleep"
:) at least better than none IMHO !
On Wed, Sep 28, 2016 at 1:13 PM, manny kung <man...@gm...> wrote:
> Hi Lars,
>
> I've whipped up a quick fix to mute BOTH the background music and the
> sound effect at the same time when pressing ctrl-M.
>
> Will commit in a minute.
>
> I know it's NOT really a complete fix since we should have separate
> control for each.
>
> Also, I feel like creating a new instance for OGGSoundClip is an overkill.
>
> I could have used a boolean or the value in UIConfig to track separate on
> the volume of the background music and the sound effect.
>
> So this is really just a quick fix.
>
> Regards,
> Manny
>
>
> On Wed, Sep 28, 2016 at 11:54 AM, manny kung <man...@gm...> wrote:
>
>> Hi Lars,
>>
>> What does it take to mute the volume of both the background sound track
>> and the sound clip at the same time ?
>>
>> I was looking at AudioPlayer class yesterday.
>>
>> In play() method, we have
>>
>> try {
>> currentOGGSoundClip = new OGGSoundClip(filepath);
>> currentOGGSoundClip.play();
>> } catch (IOException e) {
>> e.printStackTrace();
>> }
>>
>> Question : do we really want to make a new instance of
>> currentOGGSoundClip everytime we call play() ?
>>
>>
>>
>> Regards,
>> Manny
>>
>> On Thu, Mar 31, 2016 at 1:40 PM, Lars Christensen <la...@na...>
>> wrote:
>>
>>> Yes, also OpenAL is very old.
>>>
>>> Right now SourceForge is down, so I can’t commit. I hope they fix it
>>> soon.
>>>
>>> - Lars
>>>
>>> On 31 Mar 2016, at 19:16, manny kung <man...@gm...> wrote:
>>>
>>> that's great you've nailed it.
>>>
>>> we can forget LWJGL or JME's sound options cuz it'll require more prep
>>> work.
>>>
>>>
>>>
>>> On Thu, Mar 31, 2016 at 3:50 AM <la...@na...> wrote:
>>>
>>>> Hi Manny,
>>>>
>>>> I finally cracked the sound problem. It took a whole lot of piecing
>>>> together from various bits of sound sample code and some classpath
>>>> debugging.
>>>>
>>>> I don't use LWJGL for it, actually. It's more a big hack of the JOrbis
>>>> sample code.
>>>>
>>>> The code will be committed once I've cleaned it up quite a bit - maybe
>>>> this evening. Then I think we should think about making a list of things to
>>>> do before release :-)
>>>>
>>>> Take care,
>>>>
>>>> - Lars
>>>>
>>>> manny kung skrev den 2016-01-29 04:38:
>>>>
>>>> Hi Lars,
>>>>
>>>> I found this:
>>>> http://mvnrepository.com/artifact/com.github.trilarion/vorbi
>>>> s-support/1.1.0
>>>>
>>>> It has a github page.
>>>> https://github.com/Trilarion/java-vorbis-support
>>>>
>>>> I think it's good news that "..all three libraries, Jorbis, Vorbis SPI
>>>> and Tritonus Share are almost always bundled together. Together they
>>>> constitute a complete plattform independent Ogg/Vorbis support for the Java
>>>> Sound API...."
>>>>
>>>> It's fair to say that without your ogg as background musical scores and
>>>> sound effects, MSP would not be complete :)
>>>>
>>>> -Manny
>>>>
>>>>
>>>>
>>>> On Tue, Jan 19, 2016 at 12:10 PM Lars Christensen <la...@na...>
>>>> wrote:
>>>>
>>>>> Hi Manny
>>>>>
>>>>> That looks real good, thank you. Maybe I should use this instead :-)
>>>>>
>>>>> - Lars
>>>>>
>>>>>
>>>>> > On 19 Jan 2016, at 03:32, manny kung <man...@gm...> wrote:
>>>>> >
>>>>> > Hi Lars,
>>>>> >
>>>>> > I found this jme3 example of playing an ogg file. They make it super
>>>>> simple--just a few lines of codes. see below. I'm experimenting with jme
>>>>> sdk 3.1-alpha1.
>>>>> >
>>>>> > Manny
>>>>> >
>>>>> >
>>>>> > -----------
>>>>> > package jme3test.audio;
>>>>> >
>>>>> > import com.jme3.app.SimpleApplication;
>>>>> > import com.jme3.audio.AudioNode;
>>>>> > import com.jme3.audio.AudioSource;
>>>>> > import com.jme3.audio.LowPassFilter;
>>>>> >
>>>>> > public class TestOgg extends SimpleApplication {
>>>>> >
>>>>> > private AudioNode audioSource;
>>>>> >
>>>>> > public static void main(String[] args){
>>>>> > TestOgg test = new TestOgg();
>>>>> > test.start();
>>>>> > }
>>>>> >
>>>>> > @Override
>>>>> > public void simpleInitApp(){
>>>>> > System.out.println("Playing without filter");
>>>>> > audioSource = new AudioNode(assetManager,
>>>>> "Sound/Effects/Foot steps.ogg", true);
>>>>> > audioSource.play();
>>>>> > }
>>>>> >
>>>>> > @Override
>>>>> > public void simpleUpdate(float tpf){
>>>>> > if (audioSource.getStatus() != AudioSource.Status.Playing){
>>>>> > audioRenderer.deleteAudioData
>>>>> (audioSource.getAudioData());
>>>>> >
>>>>> > System.out.println("Playing with low pass filter");
>>>>> > audioSource = new AudioNode(assetManager,
>>>>> "Sound/Effects/Foot steps.ogg", true);
>>>>> > audioSource.setDryFilter(new LowPassFilter(1f, .1f));
>>>>> > audioSource.setVolume(3);
>>>>> > audioSource.play();
>>>>> > }
>>>>> > }
>>>>> >
>>>>> > }
>>>>> >
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
|