I need some help with the shoutcast code.
I'm having some multithreading issues that I don't know how to solve on my
own.

Right now EngineShoutcast is created on the heap in EngineSidechain
somewhere.
EngineSidechain is responsable for filling a buffer with audio data.
When this buffer is filled, EngineShoutcast's process() function is called.
The EngineShoutcast process() function basically just passes all audio data
on to an EncoderVorbis that it is tied to.
The EncoderVorbis then gives encoded samples back to EngineShoutcast.
Finally, EngineShoutcast uses libshout to send the data to a Shout/Icecast
server.

Libshout, however, is very buggy, and I want to implement my own
Icecast/Shoutcast interface,
based on QTcpSocket and by borrowing some code from DarkIce.

But here is the first problem.
If I'm not mistaken (I know little about multithreading), the thread where
EngineShoutcast is running does not have an event loop,
which is needed to make event-based processing for the QTcpSocket work like
it should.

How should I fix that?

Create the QTcpSocket outside of EngineShoutcast in the main thread?
or put the whole EngineShoutcast in the main thread and only put the
EncoderVorbis in the sidechain somehow?
or maybe I'm just missing the big picture.

Any help is appreciated,

-- 
Wesley Stessens <[EMAIL PROTECTED]>
Human Knowledge Belongs To The World - Antitrust (2001)
http://wesley.debianbox.be
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to