#include <jmixer.h>
Collaboration diagram for Stream_mixer:
Everything is connected to Stream_mixer: the instance of this class controls all existent input and output channels attached to it, plus it holds the file descriptors for the soundcard and all the necessary private buffers of MuSE.
The Stream_mixer runs thru the cafudda() function which should be always called from the main (parent) thread of your program.
Child threads are spawned by some of the public functions offered by this class, anyway you don't have to take care of those issues.
Definition at line 57 of file jmixer.h.
Public Member Functions | |
Stream_mixer () | |
the Stream_mixer class constructor | |
~Stream_mixer () | |
the Stream_mixer class destructor | |
bool | create_channel (int ch) |
create channel ch | |
bool | delete_channel (int ch) |
deletes the channel ch | |
bool | add_to_playlist (int ch, const char *file) |
inserts a new entry at the bottom of a channel playlist | |
void | rem_from_playlist (int ch, int pos) |
removes the entry at a certain position from a channel playlist | |
bool | set_channel (int ch, int playlist_pos) |
selects the entry at a certain position of a channel playlist | |
int | play_channel (int ch) |
set the channel playing | |
bool | stop_channel (int ch) |
stop the channel | |
bool | pause_channel (int ch) |
switch channel pause state between true and false | |
bool | pause_channel (int ch, bool stat) |
set the channel pause state | |
bool | set_volume (int ch, float vol) |
set a channel volume | |
void | set_all_volumes (float *vol) |
set all channel volumes at once | |
void | crossfade (int ch1, float vol1, int ch2, float vol2) |
set the volumes of two channels at once | |
bool | set_playmode (int ch, int mode) |
set the playmode of a channel (LOOP,CONT,PLAY) | |
void | set_speed (int ch, int speed) |
this is VERY EXPERIMENTAL, but we might get there soon | |
bool | set_position (int ch, float pos) |
set the channel position (from 0.0 to 1.0) | |
bool | move_song (int ch, int pos, int nch, int npos) |
move a playlist entry of a channel from a position to the other | |
bool | set_live (bool stat) |
set the state of the live input from soundcard | |
bool | set_lineout (bool stat) |
set the state of the live output to soundcard | |
int | create_enc (enum codec enc) |
Create a new OutChannel encoder channel. | |
void | delete_enc (int id) |
Delete an OutChannel encoder (discards ID). | |
OutChannel * | get_enc (int id) |
Returns the OutChannel instance with the given ID. | |
bool | apply_enc (int id) |
apply the current OutChannel configuration | |
void | register_gui (GUI *reg_gui) |
tell the mixer there is an GUI | |
bool | open_soundcard (bool in, bool out) |
void | close_soundcard () |
void | cafudda () |
THIS IS THE MAIN MIXING PROCEDURE: CAFUDDA! | |
bool | dsp_ok () |
notice if we have a soundcard | |
void | cli_vumeter_set (int val) |
so this is as well experimental | |
Public Attributes | |
Channel * | chan [MAX_CHANNELS] |
LiveIn | livein |
Linklist | outchans |
OutChannel * | lame |
OutChannel * | ogg |
bool | cli_vumeter |
commandline vumeter is experimental | |
bool | dspout |
is there output to the soundcard speakers? | |
bool | linein |
is there some input from the microphone? | |
bool | fileout |
is there a file dumping? (redundant!) | |
bool | quit |
should we keep on running? |
|
THIS IS THE MAIN MIXING PROCEDURE: CAFUDDA! Cafudda should be repeatedly called by the main process. It doesn't fills up the CPU load so there is no need to wait or do any time syncronizing, it is just all done inside. Call it repeatedly after launching all the GUI threads and setting up the engine to act as you like, then while running on the main process the mixer can still be used by interface threads. see main.cpp for an example of its use. Definition at line 216 of file jmixer.cpp. |
|
notice if we have a soundcard
|
|
tell the mixer there is an GUI Used to register a GUI instance to a Stream_mixer An example of using it is inside muse.cpp main()
Definition at line 135 of file jmixer.cpp. |
|
Array of Channels |
|
live soundcard input |
|
encoder outchannels |