Author Topic: play wav file  (Read 1368 times)

drak

  • Newbie
  • *
  • Posts: 3
    • View Profile
play wav file
« on: February 18, 2011, 08:18:54 am »
Hello. For me does not turn out to lose created by me wav file.  A voice file is created normally.  A telephone number is caused... All ok. But! At a procedure of Call call for me the program does not get in procedure of Onlineconnected; In procedure Onlineconnected wrote such code of:
begin
 PlayMyFile;
end;
In both forms of yunity in uses declared.
Procedure PlayMyFile in other units created:

procedure PlayMyFile;
begin
with Frmmain do 
begin 
if fileexists(wavefile) then 
nrwave1.PlayFileName:=wavefile;
nrwave1.PlayStart;
end;
end;

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: play wav file
« Reply #1 on: February 18, 2011, 08:29:22 am »
Hello

Does Demos\Voice\voicedemo.dpr work correctly with your modem?

If voicedemo is ok, please check that your WAV file has following sound format:
PCM, 16bit, 8kHz, Mono

It is ordinal format for serial sound driver.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

drak

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: play wav file
« Reply #2 on: February 22, 2011, 07:50:47 am »
Hello

Does Demos\Voice\voicedemo.dpr work correctly with your modem?

If voicedemo is ok, please check that your WAV file has following sound format:
PCM, 16bit, 8kHz, Mono

It is ordinal format for serial sound driver.

Roman Novgorodov
DeepSoftware.Com
Hello. Yes, a demo version works. Wav create a file in such format:
try
      TSW:=TSpFileStream.Create(nil);
      TSW.Format.type_:=SAFT8kHz16BitMono;
  ...
      finally
      Tsw.Close;
      end;

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: play wav file
« Reply #3 on: February 22, 2011, 08:08:35 am »
Hello

We know nothing about your TSpFileStream class.

We used ordinary windows sound recorder app for create WAV file in necessary format.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.