Intermitent: MC64 Playsound not playing the .wav  [SOLVED]

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Intermitent: MC64 Playsound not playing the .wav

Postby arjfca » 29 Oct 2014

Hello

A function to center a chart over an arrow incluse a Playsound function.

The print do show the result, but, strangely, MC 64 does not always activate the PlaySound function.. No .wav file is played. The file do exist at the location

Code: Select all

If arrownumber <>-2 then begin
count = count +1;
print (arrownumber:0:0, " ", count:0:0);
ArrowBarNumber = arw_getbarnumber(arrowNumber);
Print(ArrowbarNumber:0:0, " " , arrownumber);

scrolltobar(1,arrowbarnumber + MaxBarsBack);
playsound("G:\Users\Utilisateur\Documents\Bourse\Sound\Scroll to selected arrow.wav");
end
else begin
playsound("G:\Users\Utilisateur\Documents\Bourse\Sound\No Arrow on the chart.wav");
end;

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Intermitent: MC64 Playsound not playing the .wav

Postby TJ » 29 Oct 2014

Hello
A function to center a chart over an arrow incluse a Playsound function.
The print do show the result, but, strangely, MC 64 does not always activate the PlaySound function.. No .wav file is played. The file do exist at the location

Code: Select all

If arrownumber <>-2 then begin
count = count +1;
print (arrownumber:0:0, " ", count:0:0);
ArrowBarNumber = arw_getbarnumber(arrowNumber);
Print(ArrowbarNumber:0:0, " " , arrownumber);
scrolltobar(1,arrowbarnumber + MaxBarsBack);
playsound("G:\Users\Utilisateur\Documents\Bourse\Sound\Scroll to selected arrow.wav");
end
else begin
playsound("G:\Users\Utilisateur\Documents\Bourse\Sound\No Arrow on the chart.wav");
end;
Give this a try ... change the sound filename to something without any space in it.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Intermitent: MC64 Playsound not playing the .wav

Postby arjfca » 29 Oct 2014

OK, will try

The strange thing is I never had any problem with regular MC.

Martin

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Intermitent: MC64 Playsound not playing the .wav

Postby Henry MultiСharts » 30 Oct 2014

Martin, if TJ's solution does not help - please re-install the drivers for your sound card.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Intermitent: MC64 Playsound not playing the .wav  [SOLVED]

Postby arjfca » 30 Oct 2014

I think I found the problem

The indicator is a Mouse event data capture. Recently, I added a "CLICK" sound to enhance the mouse click whenever a Shift + Mouseclick occur.

Problem seem to be a conflict when two call to a PlaySound occur in a very short period moment. The first one is played but the other one is not heard.

Will find a way to prevent the conflict

Martin


Return to “MultiCharts”