| View previous topic :: View next topic |
| Author |
Message |
PatD Member
Joined: 18 Oct 2006 Posts: 2
|
Posted: 18/10/06 16:31 Post subject: Wave format |
|
|
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 |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1044 Location: Tehran, Iran
|
Posted: 18/10/06 16:45 Post subject: |
|
|
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 |
|
 |
PatD Member
Joined: 18 Oct 2006 Posts: 2
|
Posted: 18/10/06 17:02 Post subject: |
|
|
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.
| Description: |
|
 Download |
| Filename: |
Simple.zip |
| Filesize: |
2.16 KB |
| Downloaded: |
4 Time(s) |
|
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1044 Location: Tehran, Iran
|
Posted: 18/10/06 17:45 Post subject: |
|
|
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 |
|
 |
|