This project is read-only.

Audiofile/Text2Speech Playback

Aug 23, 2010 at 9:32 AM
Edited Aug 23, 2010 at 10:01 AM

Hi!

I had a big problem with playing Audiostreams to the CAPI.. the problem exists with streams of a size of about >3 secs... by trying to play I got an exception out of the native CAPI... I use a AVM PCI ISDN card for that... the solution for that problem was to split the audiostream in little peaces - I made pieces of about 1 sec.. that works well and will play audiostreams of any length...

the other problem is/was... how can I determine that the audiostream playing is finished.. by now I calculate the playlength and do a sleep... that works well for one caller - but not if there are two ore more... in that case the audio streams are not played parallel.. for example.. First Call1 and then Call2 are getting in nearly parallel - the audiostream is played to Call1 but the audiostream to Call2 is played after the playing to Call1 has finished... I think it is a threading problem in my application... how would you solve that - is the capi.net library capable of playing parallel two different audiostreams to two different callers?

Cheers,

Halo

Coordinator
Aug 25, 2010 at 1:39 PM
Edited Aug 26, 2010 at 11:18 AM

Hi,

yes CAPI.NET is capable for playing more than 1 stream at the same time. Playing streams is not an easy part because of the buffering, synchronization and so on. You can check the code and example. In example I show how to send audio file over the wire. You also can check the code of the API how multithreading is implemented.
Regards
Michail
On Aug 23, 2010, at 11:32 AM, Halo wrote:

From: Halo

Hi!

I had a big problem with playing Audiostreams to the CAPI.. the problem exists with streams of a size of about >3 secs... by trying to play I got an exception out of the native CAPI... I use a AVM PCI ISDN card for that... the solution for that problem was to split the audiostream in little peaces - I made pieces of about 1 sec.. that works well and will play audiostreams of any length...

the other problem is/was... how can I determine that the audiostream playing is finished.. by now I calculate the playlength and do a sleep... that works well for one caller - but not if there are two ore more... in that case the audio streams are not played parallel.. for example.. First Call1 and then Call2 are getting in nearly parallel - the audiostream is played to Call1 but the audiostream to Call2 is played after the playing to Call1 has finished... I think it is a threading problem in my application... how would you solve that - is the capi.net library capable of playing in parallel to two different audiostreams to two callers?

Cheers,

Halo

Read the full discussion online.

To add a post to this discussion, reply to this email (CAPI@discussions.codeplex.com)

To start a new discussion for this project, email CAPI@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com