bugGnash - The GNU Flash player - Bugs: bug #35984, I Love Traffic is not able to mute...

 
 

bug #35984: I Love Traffic is not able to mute its sound on Gnash

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Sat 24 Mar 2012 10:52:37 AM UTC
   
 
Category:  ActionScript Severity:  3 - Normal
Release:  master Status:  Confirmed
Privacy:  Public Assigned to:  strk
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 29 Dec 2015 10:08:29 AM UTC, comment #7: 

This is a video result of `soundvolume-1secplayed.swf` under Flash Player:
http://www.mediafire.com/?qck5cxf9h9npncm

You'd see that volume level was reduced around 2 sec after starting.

This is a video result of `soundvolume-1secplayed.swf` under Gnash:
http://www.mediafire.com/?lrqv575jotfv6c3

You'd see that the sound was played entirely in full volume.


Screecasts from both players and log files from Gnash (verbosity 2 with
action error log) are attached as `soundvolume-roundup.4c03566-fp9.0.45.0.zip`.

Gnash: 0.8.11dev (git 4c03566 19-Dec-2015)
System: Debian GNU/Linux 7.0 Wheezy i386

Flash Player: 9.0r45 (9.0.45.0) Standalone
System: Microsoft Windows XP Professional SP3

(file #35884)

Nutchanon Wetchasit <nachanon>
Tue 29 Dec 2015 10:02:51 AM UTC, comment #6: 

This is a video result of `soundvolume-ref.swf` under Flash Player:
http://www.mediafire.com/?5lbiiiu1pnrb7gx

This is a video result of `soundvolume-preattach.swf` under Flash Player:
(`soundvolume-preplay.swf` and `soundvolume-playing.swf` gave the same result)
http://www.mediafire.com/?26vey3a7itl71n2

You'd see that sound volume level was reduced in second video.


This is a video result of `soundvolume-ref.swf` under Gnash:
http://www.mediafire.com/?9xg71s59nydgwy8

This is a video result of `soundvolume-preattach.swf` under Gnash:
(`soundvolume-preplay.swf` and `soundvolume-playing.swf` gave the same result)
http://www.mediafire.com/?m06x41kg6kf7ihx

You'd see that the sound was still played at full volume in second video.


Gnash: 0.8.11dev (git 4c03566 19-Dec-2015)
System: Debian GNU/Linux 7.0 Wheezy i386

Flash Player: 9.0r45 (9.0.45.0) Standalone
System: Microsoft Windows XP Professional SP3

Nutchanon Wetchasit <nachanon>
Sat 26 Dec 2015 02:58:13 PM UTC, comment #5: 

Nevermind, the AS errors are due to the common construct:

 if( !SoundVolumePreAttach ) {
   _global.SoundVolumePreAttach = R0;
 ...

So the problem is realy just honouring .setVolume on a Sound object.

Sandro Santilli <strk>
Group Member
Sat 26 Dec 2015 02:56:33 PM UTC, comment #4: 

Enabling actionscript errors verbosity give some hints:

ACTIONSCRIPT ERROR: reference to non-existent variable 'SoundVolumePreAttach'
ACTIONSCRIPT ERROR: reference to non-existent variable 'SoundVolumePrePlay'
ACTIONSCRIPT ERROR: reference to non-existent variable 'SoundVolumePlaying'
ACTIONSCRIPT ERROR: reference to non-existent variable 'SoundVolume1SecPlayed'

Sandro Santilli <strk>
Group Member
Thu 24 Dec 2015 12:18:57 PM UTC, comment #3: 

This is still reproducible under current git version of Gnash, and is not
really specific to adjusting volume while the sound was playing.

I have created simple SWF files (Flash 7, using MTASC and SWFmill) that tries
to play embedded sound with adjusted volume from ActionScript in five style:

# No volume adjustment, as a reference: `soundvolume-ref.swf`
# Reduce volume right before running `Sound.attachSound()`: `soundvolume-preattach.swf`.
# Reduce volume right before playing sound: `soundvolume-preplay.swf`.
# Reduce volume right after started playing sound: `soundvolume-playing.swf`.
# Reduce volume 1 second after started playing sound: `soundvolume-1secplayed.swf`.

It turned out that changing embedded sound volume using all of the way
mentioned here have no effect under Gnash; they all played in full volume.
(All of them works in expected fashion when running under Adobe Flash Player)

Test SWF files, source code, and sound (PCM 44100 Hz 16-bit Mono, 5.0 sec)
are attached as `soundvolume.zip`. Comparison screencast and logs will follow.

Gnash: 0.8.11dev (git 4c03566 19-Dec-2015)
System: Debian GNU/Linux 7.0 Wheezy i386

Flash Player: 9.0r45 (9.0.45.0) Standalone
System: Microsoft Windows XP Professional SP3


(file #35849)

Nutchanon Wetchasit <nachanon>
Thu 29 Mar 2012 05:37:26 PM UTC, comment #2: 

It looks like the problem is that gnash is unable to change volume of a running stream. The code shown gets to setting the volume on the DisplayObject.

I'd love to see an automated testcase for this.

Sandro Santilli <strk>
Group Member
Thu 29 Mar 2012 03:15:39 PM UTC, comment #1: 

Here's the code:

var globalSound = new Sound(this);
var muted = false;

sign.popUpMenu.muteButton.onRelease = function () {
  muted = !muted;
  if( muted ) {
    globalSound.setVolume(0);
  } else {
    globalSound.setVolume(100);
  }
};

Sandro Santilli <strk>
Group Member
Sat 24 Mar 2012 10:52:37 AM UTC, original submission:  

I've used Gnash 0.8.10 binary from getgnash.org APT repository on Debian GNU/Linux 5.0 to play I Love Traffic game (flash10)

http://armorgames.com/play/3515/i-love-traffic
(http://armorgames.com/files/games/i-love-traffic-3515.swf)

It played well (aside from not-so-good performance). I'm able to operate traffic lights, crash cars, and play through all the levels.

But I found that when I clicked on "Mute" at the bottom, it had no effect, background music still playing, and car crash still audible.

Gnash: gnash_0.8.10-1~lenny from getgnash.org APT repository
System: Debian GNU/Linux 5.0 "Lenny" (i386: Intel Pentium 4, 2.66 GHz)

Nutchanon Wetchasit <nachanon>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #35884:  soundvolume-roundup.4c03566-fp9.0.45.0.zip added by nachanon (615KiB - application/zip - Screencasts and logs from running test files under Gnash and Flash Player)
file #35849:  soundvolume.zip added by nachanon (1MiB - application/zip - Test Flash files, sound, source code, and build scripts)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by nachanon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-29 nachanon Attached File- Added soundvolume-roundup.4c03566-fp9.0.45.0.zip, #35884
    2015-12-26 strk StatusIn Progress Confirmed
    2015-12-26 strk StatusConfirmed In Progress
        Assigned toNone strk
    2015-12-26 strk SummaryI Love Traffic is not able to mute it\'s sound on Gnash I Love Traffic is not able to mute its sound on Gnash
    2015-12-26 strk Categorysound ActionScript
    2015-12-24 nachanon Attached File- Added soundvolume.zip, #35849
    2012-06-12 strk CategoryNone sound
    2012-03-29 strk Releaseother master
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code