View Full Version : sound alert
velocity
01-26-2010, 05:56 AM
Don't know if this expected behavior but thought I would mention it.
When importing indicators from 6.5 to 7, if you have a sound alert using
PlaySound(@"C:\Program Files\NinjaTrader 6.5\sounds\Alert1.wav");
you better change it to
PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\Alert1.wav");
I would have expected that it would not matter where the wav file is located, however NT7 only recognizes the path with NinjaTrader 7.
hmmmm?
mrlogik
01-26-2010, 06:57 AM
Velocity,
I don't believe you need the NinjaTrader path in there at all.
It defaults to the C:\Program Files\NinjaTrader x\sounds\ directory
I always just use PlaySound("Alert1.wav"); that will use the proper directory.
velocity
01-26-2010, 08:57 AM
Thanks for the tip.
Harry
02-23-2010, 03:31 AM
I use indicators with customized sound alerts. So I copied the .wav files from the NT 6.5. to the NT 7 sounds directory.
When using the indicators with NT 7, I do not get any sound alerts, but the indicator throws an exception, as can be seen in the trace file:
Cbi.AlertCollection.ProcessEventArgsInThreadContex t, exception caught: The Sound-API only supports PCM wave files.
What is this again, and why have specs changed with respect to NT 6.5.?
Harry
02-23-2010, 04:00 AM
For those, who have the same problem: The Windows Audio Recorder allows to convert all types of WAV files to WAV/PCM files. After conversion the WAV files used for NT 6.5. can also be used for NT 7!
NinjaTrader_Dierk
02-23-2010, 06:51 AM
Harry, thanks for figuring that out.
Harry
02-23-2010, 07:03 AM
Can the NT7 Sound API be modified in a way that it reads the same .WAV files as NT 6.5.? There might quite a number of users with their soundfiles no longer working when switching form NT 6.5 to NT 7.
Just in case that they do not find this thread.
NinjaTrader_Dierk
02-23-2010, 07:04 AM
Unfortunately not.
NinjaTrader_Dierk
04-15-2010, 04:11 AM
For those, who have the same problem: The Windows Audio Recorder allows to convert all types of WAV files to WAV/PCM files. After conversion the WAV files used for NT 6.5. can also be used for NT 7!
Hmm ... I just checlked. I would not find a reference for "Windows Audio Recorder" on my Win7 64bit machine. There is a "Sound recorder" which would allow to record but not to convert existing sound files. Am I missing something?
Thanks
Harry
04-15-2010, 09:22 AM
Hi Dierk,
this another present from Microsoft to make their customers happy. :D
Windows XP Professional: Audiorecorder allows to convert audio files. The audiorecorder will save any open file in 12 different file formats, each with a large variety of further options.
Windows Vista: Audiorecorder cannot convert sound files.
I do not own a Win7 64bit machine, but I imagine that Microsoft has maintained this new feature of their audiorecorder.
Hmm ... I just checlked. I would not find a reference for "Windows Audio Recorder" on my Win7 64bit machine. There is a "Sound recorder" which would allow to record but not to convert existing sound files. Am I missing something?
Thanks
NinjaTrader_Dierk
04-15-2010, 09:24 AM
Thanks for your feedback. Where exactly in XP would I find that audio recorder?
Harry
04-15-2010, 09:50 AM
Basically you would need to convert WAV/MPEG to WAV/PCM files. If Windows Vista and Windows 7 do not come with a conversion tool, you could download some freeware. I just tested a tool called free audio converter, and it was easy to convert my WAV/MPEG files. It just annoyed me a little, because everytime I used it, it wanted to install a toolbar....
NinjaTrader_Dierk
04-15-2010, 09:51 AM
Excellent. Thanks
>> called free audio converter
would you have a link?
Harry
04-15-2010, 09:51 AM
Programme -> Zubehör -> Unterhaltungsmedien -> Audiorecorder (sorry my Windows is not in English)
Thanks for your feedback. Where exactly in XP would I find that audio recorder?
Harry
04-15-2010, 09:55 AM
I am sure there are other tools as well. This was just the first one I stumbled upon...
http://www.dvdvideosoft.com/products/dvd/Free-Audio-Converter.htm
Excellent. Thanks
>> called free audio converter
would you have a link?
NinjaTrader_Dierk
04-15-2010, 10:49 AM
Thanks, I'll check it out.
NinjaTrader_Dierk
04-15-2010, 11:35 AM
Thanks again, Harry. Looks like this would resolve some issues here: http://www.ninjatrader-support2.com/vb/showthread.php?p=159018#post159018