Can't stop the sound

  • I have composed a tour at AutoPano Tour then add soundinterface plagin.
    If I transfer to another panoram via hotspot or map the sound from first panorama can't stop.
    Below the code which I used.
    Have someone this problem.
    Can I fix it?


    <krpano version="1.0.8">
    <events onloadcomplete="playsound3D(auto, SvetlogorskTourdata/sounds/sound3.mp3, 120, 0, 140, 0.3, 0, 0)"
    keep="false"/>


    <panoview h="0" v="0" fov="90"/>
    <view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="90" fovmin="55.88" fovmax="99" fov="90" hlookat="0" vlookat="0"/>
    <preview url="SvetlogorskTourdata/SvetlogorskTour10/preview.jpg"/>
    <image type="CUBE">
    <left url="SvetlogorskTourdata/SvetlogorskTour10/3.jpg"/>
    <front url="SvetlogorskTourdata/SvetlogorskTour10/0.jpg"/>
    <right url="SvetlogorskTourdata/SvetlogorskTour10/1.jpg"/>
    <back url="SvetlogorskTourdata/SvetlogorskTour10/2.jpg"/>
    <up url="SvetlogorskTourdata/SvetlogorskTour10/4.jpg"/>
    <down url="SvetlogorskTourdata/SvetlogorskTour10/5.jpg"/>
    </image>
    <hotspot name="spot0" onclick="loadpano(SvetlogorskTour37.xml);" url="SvetlogorskTourdata/graphics/spots/spot1.swf" ath="380.547" atv="1.70526"/>
    <hotspot name="spot1" onclick="loadpano(SvetlogorskTour0.xml);" url="SvetlogorskTourdata/graphics/spots/spot1.swf" ath="514.606" atv="1.24654"/>
    <hotspot name="spot2" onclick="action(closeallobjects);set(plugin[spot2object].visible,true);tween(plugin[spot2object].alpha, 1);" bordercolor="0xffffffff" borderalpha="1" fillcolor="0xffffffff" fillalpha="0.25098" bordercolorhover="0xffffffff" borderalphahover="1" fillcolorhover="0xffffffff" fillalphahover="0.25098" onhover="showtext(Kaiserling promenade);">
    <point ath="486.776" atv="-0.865405"/>
    <point ath="487.142" atv="11.7091"/>
    <point ath="506.138" atv="11.6764"/>
    <point ath="505.965" atv="-0.490682"/>
    </hotspot>
    <plugin name="spot2object" visible="false" url="SvetlogorskTourdata/graphics/spots/object0.JPG" align="center" alpha="0" onclick="tween(alpha, 0);delayedcall(0.5,set(visible,false));" onhover="showtext(Kaiserling promenade);"/>
    <action name="closeallobjects">set(plugin[spot2object].alpha, 0);set(plugin[spot2object].visible,false);</action>


    <plugin name="soundinterface"
    url="soundinterface.swf"
    rootpath="%SWFPATH%"
    keep="false"
    />


    </krpano>

    Edited once, last by Aleksey (June 14, 2010 at 7:37 PM).

  • Hi,

    Is it possible to turn down the sound slowly when i move from a pano to an other ?

    And then, turn up when the next one is loaded ? (with a different sound for each one) All that in the xml, not interactive..

    Thanks. *smile*

    Steph

    Edited 2 times, last by esys (January 12, 2011 at 12:05 AM).

  • very easy

    where ever you have your onclick to load the next pano add this.

    onclick="loadpano(test.xml,null,MERGE|BLEND(2)); tween(plugin[soundinterface].volume, 0);"

    in the onloadcomplete of the next pano

    <event onloadcomplete="playsound3D(auto, nextsound.mp3, 120, 0, 140, 0.3, 0, 0); tween(plugin[soundinterface].volume, 0.75);"

  • Hi,

    Thanks for your answer VN2009.

    It works great! *tongue* (just "event(s)")

    I can also down the sound slowly (with your code *smile* ) and then start an other one:

    Also, i'd like to set the same thing when clicking on the thumbnails. Problem is when you change pano via the thumbnails, first sound is still running while the second one's starting. *huh*
    I've tried in "openthumns" action (with your tween code)'. No success..

    Any help ? *smile*

    Thanks

    Steph

    Edited 2 times, last by esys (January 24, 2011 at 1:09 AM).

  • Hi again,

    I can see that the volume of my three songs is just sensible between 0.3 and 0 !
    Over 0.3 i can't hear the difference! I added a "volume=1" to my plug in, then changed the setting in my scene events, still the same.

    Also, i can't find an example with a "playsound2D" code to understand the "pan" setting. It would be in accordance with my pano if
    when you turn to 180° on the left or right hand side of the pano, step by step, the sound looks like coming from behind. But not dissapear.

    I've tried the 3D but i can't find the way to keep a little bit of volume when turning to 180°.
    Any idea ?

    Code
    <plugin name="soundinterface" url="%SWFPATH%/plugins/soundinterface.swf" keep="false" volume="1" onloaded="" />      
    	<plugin name="options" url="%SWFPATH%/plugins/options.swf" keep="true" />
    	
         <events onloadcomplete="stopsound(Eglise); stopsound(Afrique); 
                                  playsound3D(Mouettes,%SWFPATH%/music/sf_port.mp3,32.83,7.94,180,0.9,0); 
                                  playsound3D(Port,%SWFPATH%/music/port_voiliers_mat_vent.mp3,32.83,7.94,180,0.9,0); 
                                  tween(plugin[soundinterface].volume, 0.9);" />

    Thanks *smile*

    Steph

    Edited 2 times, last by esys (January 24, 2011 at 1:05 AM).

  • I can see that the volume of my three songs is just sensible between 0.3 and 0 !
    Over 0.3 i can't hear the difference! I added a "volume=1" to my plug in, then changed the setting in my scene events, still the same

    no idea here maybe open your audio in Audacity and see if there is any clipping. maybe the track itself is preventing the audio from getting louder?

    I've tried the 3D but i can't find the way to keep a little bit of volume when turning to 180°.
    Any idea ?

    i know the videoplugin has a outofrangevolume="0" that can be changed i cant remember of the 3d sound does. open it in the editor and you will see any missing options.

    Also, i'd like to set the same thing when clicking on the thumbnails. Problem is when you change pano via the thumbnails, first sound is still running while the second one's starting.
    I've tried in "openthumns" action (with your tween code)'. No success..

    cant remember what your talking about i have a terrible memory! to fix that just add a stopallsounds(); before every playsound(); then no matter what is play it will stop that before starting the next.

  • I had same problem, and added onclick="loadscene(pano4,merge,blend(4));stopsound(sound)" so that sound was killed when you clicked on link to next pano. this works on ipad but not on iphone which may be to do with how iphone plays mp3.


    Tim

  • I had same problem, and added onclick="loadscene(pano4,merge,blend(4));stopsound(sound)" so that sound was killed when you clicked on link to next pano. this works on ipad but not on iphone which may be to do with how iphone plays mp3.


    Tim

    i use stopallsounds(); that stops any sound reguardless of ID. it also works on the iphone. even using the iphone user agent in safari it still detects that you are using a PC.

  • Hi,

    I still have problems with the sound in my Vtour.

    Thanks again VN for your tween code (works great with the hotspots), but it doesn't work with the thumbnails. I've tried this :


    <action name="openthumbs">
    if(%1 != NEXT,
    set(i,0);
    set(events.onclick, set(events.onclick,null); delayedcall(0.1, closethumbs() ); );
    );

    if(i LT scene.count,
    txtadd(thumbname,'thumb_',get(i));
    openthumb(get(thumbname));
    set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); tween(plugin[soundinterface].volume, 0.0, 2); loadscene(get(linkedscene),null,NOPREVIEW,BLEND(2)); );
    inc(i);
    openthumbs(NEXT);
    );
    </action>


    or this :


    set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); stopallsounds(); loadscene(get(linkedscene),null,NOPREVIEW,BLEND(2)); );


    It works for both of them but brutally whatever the code is.!

    if i do with set function, it works also but when you come back on your first pano for the second time, no sound comes out.!
    I'd like it down slowly like my hotspots :

    <hotspot name="marina"
    ........

    onclick="tween(plugin[soundinterface].volume, 0.15);
    tween(alpha, 0.3,2.5);
    tween(plugin[Texte-Torre].alpha, 0.0, 2);
    tween(plugin[google].alpha, 0.0, 2);
    looktohotspot(get(name), 65,linear(25));
    tween(plugin[soundinterface].volume, 0);
    stopallsounds();
    loadscene(scene_Marina-Santa-Teresa, null, NOPREVIEW, BLEND(1.5));
    wait(LOAD);
    oninterrupt(break);
    wait(BLEND);"
    devices="all"
    />

    Thanks. You can check this thread also to stop and play the sound with buttons,(i still got to keep a bug!):

    pause and play button bug !

    Thanks everybody. *smile*

  • Hi again,

    I've checked this thread to get the sound before the "moveto" :

    Sound that starts immediately

    The problem is, i've created two buttons 'pause and play' (in the skin xml) and it worked when i started the sound from the events (after the "moveto" so) :

    <scene name="scene_Marina-Santa-Teresa" title="Marina Di Santa Teresa" onstart="wait(LOAD); oninterrupt(break); moveto(-15.52,15.89, smooth(100,50,10));" thumburl="Marina-Santa-Teresa.tiles/thumb.jpg">
    ......
    <events onloadcomplete="set(plugin[Texte-Torre].visible, true); playsound2D(Cigales,%SWFPATH%/music/cigales.mp3,0.9,0,0); playsound2D(Vent,%SWFPATH%/music/vent.mp3,0.4,0,30);" />


    But when i write it in "onstart", the sound begin before the move but the buttons don't work :

    <scene name="scene_Marina-Santa-Teresa" title="Marina Di Santa Teresa" onstart="wait(LOAD); playsound2D(rieuse,%SWFPATH%/music/rieuse.mp3,0.8,0,9); playsound2D(Port,%SWFPATH%/music/port_voiliers_mat_vent.mp3,0.9,0,9); oninterrupt(break); moveto(-15.52,15.89, smooth(100,50,10));" thumburl="Marina-Santa-Teresa.tiles/thumb.jpg">

    Any idea ? include the two plugin "pause and play" buttons in the main xml ?

    Thanks. *smile*

    ]Edit: Sorry Solved ! A mistake in my code ! *unsure*

    Steph

    Edited 2 times, last by esys (February 9, 2011 at 6:46 PM).

  • If anyone still have problems with stopallsounds() not working make sure that all you files are updated to the last beta and alpha beta versions.

    I just found that this was why It did not work in one of my first test of the new soundinterface.

    Hans

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!