Author Topic: S save sound effect stops stage music.  (Read 2297 times)

Ario147

  • Spike Dodger
  • Posts: 201
  • Sex me
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 46.0.2490.80 Chrome 46.0.2490.80
    • View Profile
    • YouTube
  • Playstyle: Keyboard
S save sound effect stops stage music.
« on: October 24, 2015, 08:36:55 AM »
So I have ,,S" save that has Collision with Player with code:

if keyboard_check_pressed(ord("S")){
if (saveTimer < 0 && instance_exists(player) == true) {
    saveTimer = 30;
    image_index = 1;
    image_speed = 0.017;
    saveGame(0);
    sound_play(SaveSound);
}}

Everything works, but when the SaveSound is played it mutes music from my stage. Music is Use Multimedia Player and SaveSound is Normal Sound.
Help fix.  :atkCry:
Its a beautiful day outside.

Birds are singing, flowers are blooming,

On days like these, kids like you...

S H O U L D  B E  B U R N I N G  I N  H E L L .

RebornIsaac

  • Cherry Eater
  • Posts: 65
  • ~(´・ω・`)~
  • OS:
  • Windows 8.1/Server 2012 Windows 8.1/Server 2012
  • Browser:
  • Chrome 44.0.2403.130 Chrome 44.0.2403.130
    • View Profile
  • Playstyle: Keyboard
Re: S save sound effect stops stage music.
« Reply #1 on: October 24, 2015, 09:54:01 AM »
What is the SaveSound filetype? And what is in the SaveGame script?

Ario147

  • Spike Dodger
  • Posts: 201
  • Sex me
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 46.0.2490.80 Chrome 46.0.2490.80
    • View Profile
    • YouTube
  • Playstyle: Keyboard
Re: S save sound effect stops stage music.
« Reply #2 on: October 24, 2015, 10:18:12 AM »
All files are MP3, and SaveGame script is:

//�Q�[����Z�[�u
//�Z�[�u�f�[�^�Ȃǂ͊�{�I�Ƀo�C�i���`���ŕۑ�����Ă��܂�
var f,tem;
f = file_bin_open("save"+string(global.savenum),1);
tem = room;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
file_bin_write_byte(f,tem);

if(global.grav=0){
tem = player.x;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
file_bin_write_byte(f,tem);
tem = player.y;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
}else{
tem = player2.x;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
file_bin_write_byte(f,tem);
tem = player2.y;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
}
file_bin_write_byte(f,tem);
file_bin_write_byte(f,global.grav);

file_bin_close(f);


saveGameItem();



It's unchanged yuuutu script.
Its a beautiful day outside.

Birds are singing, flowers are blooming,

On days like these, kids like you...

S H O U L D  B E  B U R N I N G  I N  H E L L .

Starz0r

  • Owner
  • The Kid
  • Administrator
  • Posts: 343
  • Hall Of Fame
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 47.0.2526.8 Chrome 47.0.2526.8
    • View Profile
  • Playstyle: Keyboard
Re: S save sound effect stops stage music.
« Reply #3 on: October 24, 2015, 11:33:53 AM »
Sound effect can't be a MP3 or else it will overrride what is currently playing. Convert the sound effect to WAV and you'll stop having this problem.  :atkHappy:

Ario147

  • Spike Dodger
  • Posts: 201
  • Sex me
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 46.0.2490.80 Chrome 46.0.2490.80
    • View Profile
    • YouTube
  • Playstyle: Keyboard
Re: S save sound effect stops stage music.
« Reply #4 on: October 24, 2015, 11:50:51 AM »
Sound effect can't be a MP3 or else it will overrride what is currently playing. Convert the sound effect to WAV and you'll stop having this problem.  :atkHappy:

Thank you. :)
Its a beautiful day outside.

Birds are singing, flowers are blooming,

On days like these, kids like you...

S H O U L D  B E  B U R N I N G  I N  H E L L .

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 46.0.2490.80 Chrome 46.0.2490.80
    • View Profile
  • Playstyle: Keyboard
Re: S save sound effect stops stage music.
« Reply #5 on: October 24, 2015, 12:44:35 PM »
Oh, and wav file sizes are usually *REALLY* big compared to mp3s. If you're not okay with that, you might have to make them into .ogg files and use an external sound engine.
(click to show/hide)

smoke weed everyday