DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   Watched TopicsWatched Topics     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Wave format

 
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products
View previous topic :: View next topic  
Author Message
PatD
Member


Joined: 18 Oct 2006
Posts: 2

PostPosted: 18/10/06 16:31    Post subject: Wave format Reply with quote

My application is developped with C++Builder 6.
I use a TTS software that generates wave data buffers. I've implemented a TLiveAudioPlayer object. I pass the wave buffers to it using the OnDataPtr event. Everything seems ok, the buffers are accepted by the component. But I hear nothing on the head speakers.
I tried your client and server samples and everything is ok.
I supposed with is a problem with the wave format, so I've written a very simple application that uses a TLiveAudioRecord. All the received buffers are sent one by one to the TLiveAudioPlayer object. The wave formats specified in the IDE for both objects are the same.
Any idea ?
Back to top
View user's profile Send private message Send e-mail
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1044
Location: Tehran, Iran

PostPosted: 18/10/06 16:45    Post subject: Reply with quote

Besides OnDataPtr, did you handle OnFormat event properly?

TTS engines usually use none-PCM wave format as default for the output wave.

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PatD
Member


Joined: 18 Oct 2006
Posts: 2

PostPosted: 18/10/06 17:02    Post subject: Reply with quote

Here is a very simple unit that shows the problem. By clicking on the Record button, we start to record and all the buffers are sent to the TLiveAudioPlayer object. Nothing is heared and the OnDataPtr is fired very slowly.

To generate the module using C++Builder 6, simply create a new application in the directory where was extracted the files attached to this post, remove the Unit1.cpp from the project and add srcmain.cpp.

Thanks for your help.



Simple.zip
 Description:

Download
 Filename:  Simple.zip
 Filesize:  2.16 KB
 Downloaded:  4 Time(s)

Back to top
View user's profile Send private message Send e-mail
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1044
Location: Tehran, Iran

PostPosted: 18/10/06 17:45    Post subject: Reply with quote

I don't havd BCB to run your code, sorry. Anyway, here are some hints:

1) remove free(ptBfr); at line 79 in pPlayDataPtr event. Setting FreeIt to True will release the memory when it is no more needed.

2) Is your soundcard full-duplex? You can examine it using TAudioRedirector.

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products All times are GMT
Page 1 of 1

Add to favorites

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group