- -( dyne // software :: culture :: events :: planet :: discussion :: museum \\ freaknet )- -
 
Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members

Stream_mixer input channels


Detailed Description

The following are methods implemented in the Stream_mixer class to control input channels (InChannel class) that are then mixed together and sent to output channels (OutChannel class).

The input channels make audio chunks available thru buffered and threadsafe FIFO pipes (Pipe class), for the mixer to mix.

The playlist functions are incorporated inside the Linklist and Playlist classes - which you can freely access.


Functions

bool Stream_mixer::create_channel (int ch)
 create channel ch

bool Stream_mixer::delete_channel (int ch)
 deletes the channel ch

bool Stream_mixer::add_to_playlist (int ch, const char *file)
 inserts a new entry at the bottom of a channel playlist

void Stream_mixer::rem_from_playlist (int ch, int pos)
 removes the entry at a certain position from a channel playlist

bool Stream_mixer::set_channel (int ch, int playlist_pos)
 selects the entry at a certain position of a channel playlist

int Stream_mixer::play_channel (int ch)
 set the channel playing

bool Stream_mixer::stop_channel (int ch)
 stop the channel

bool Stream_mixer::pause_channel (int ch)
 switch channel pause state between true and false

bool Stream_mixer::pause_channel (int ch, bool stat)
 set the channel pause state

bool Stream_mixer::set_volume (int ch, float vol)
 set a channel volume

void Stream_mixer::set_all_volumes (float *vol)
 set all channel volumes at once

void Stream_mixer::crossfade (int ch1, float vol1, int ch2, float vol2)
 set the volumes of two channels at once

bool Stream_mixer::set_playmode (int ch, int mode)
 set the playmode of a channel (LOOP,CONT,PLAY)

void Stream_mixer::set_speed (int ch, int speed)
 this is VERY EXPERIMENTAL, but we might get there soon

bool Stream_mixer::set_position (int ch, float pos)
 set the channel position (from 0.0 to 1.0)

bool Stream_mixer::move_song (int ch, int pos, int nch, int npos)
 move a playlist entry of a channel from a position to the other

bool Stream_mixer::set_live (bool stat)
 set the state of the live input from soundcard

void Stream_mixer::set_mic_volume (int vol)
 set the volume of the mic live input (sample multiplyer)

bool Stream_mixer::set_lineout (bool stat)
 set the state of the live output to soundcard


Function Documentation

bool Stream_mixer::add_to_playlist int  ch,
const char *  file
[inherited]
 

inserts a new entry at the bottom of a channel playlist

This adds an input stream or playlist to a certain channel

Many kinds of files are supported:

  1. .mp3 single files
  2. .ogg single files
  3. .pls | .pl | .m3u playlists
  4. http:// mp3 streams
  5. directory/ (recusively adding recognized contents) the types are recognized using the filename, more often the extension after the last dot or the prefix before the url. You can investigate the parser in jmixer.cpp.

Parameters:
ch channel number
file full path string
Returns:
true in case of success, false otherwise

Definition at line 674 of file jmixer.cpp.

bool Stream_mixer::create_channel int  ch  )  [inherited]
 

create channel ch

At the moment MuSE gives only the possibility to have 6 channels.

This function creates the channel number ch and is necessary to call it before doing anything on the channel.

Parameters:
ch number of the channel slot (from 1 to 6)
Returns:
true in case of success, false otherwise

Definition at line 324 of file jmixer.cpp.

void Stream_mixer::crossfade int  ch1,
float  vol1,
int  ch2,
float  vol2
[inherited]
 

set the volumes of two channels at once

Definition at line 475 of file jmixer.cpp.

bool Stream_mixer::delete_channel int  ch  )  [inherited]
 

deletes the channel ch

Definition at line 350 of file jmixer.cpp.

bool Stream_mixer::move_song int  ch,
int  pos,
int  nch,
int  npos
[inherited]
 

move a playlist entry of a channel from a position to the other

Definition at line 545 of file jmixer.cpp.

bool Stream_mixer::pause_channel int  ch,
bool  stat
[inherited]
 

set the channel pause state

Definition at line 395 of file jmixer.cpp.

bool Stream_mixer::pause_channel int  ch  )  [inherited]
 

switch channel pause state between true and false

Definition at line 376 of file jmixer.cpp.

int Stream_mixer::play_channel int  ch  )  [inherited]
 

set the channel playing

Play the selected stream sound on the channel the file/stream is physically loaded here. takes only the channel number

Parameters:
ch channel number starting from 1
Returns:
0=error, 1=seekable 2=non-seekable

Definition at line 439 of file jmixer.cpp.

void Stream_mixer::rem_from_playlist int  ch,
int  pos
[inherited]
 

removes the entry at a certain position from a channel playlist

Definition at line 827 of file jmixer.cpp.

void Stream_mixer::set_all_volumes float *  vol  )  [inherited]
 

set all channel volumes at once

Definition at line 455 of file jmixer.cpp.

bool Stream_mixer::set_channel int  ch,
int  playlist_pos
[inherited]
 

selects the entry at a certain position of a channel playlist

Definition at line 413 of file jmixer.cpp.

bool Stream_mixer::set_lineout bool  stat  )  [inherited]
 

set the state of the live output to soundcard

Definition at line 593 of file jmixer.cpp.

bool Stream_mixer::set_live bool  stat  )  [inherited]
 

set the state of the live input from soundcard

Definition at line 560 of file jmixer.cpp.

void Stream_mixer::set_mic_volume int  vol  )  [inherited]
 

set the volume of the mic live input (sample multiplyer)

Definition at line 585 of file jmixer.cpp.

bool Stream_mixer::set_playmode int  ch,
int  mode
[inherited]
 

set the playmode of a channel (LOOP,CONT,PLAY)

Definition at line 617 of file jmixer.cpp.

bool Stream_mixer::set_position int  ch,
float  pos
[inherited]
 

set the channel position (from 0.0 to 1.0)

Definition at line 512 of file jmixer.cpp.

void Stream_mixer::set_speed int  ch,
int  speed
[inherited]
 

this is VERY EXPERIMENTAL, but we might get there soon

Definition at line 487 of file jmixer.cpp.

bool Stream_mixer::set_volume int  ch,
float  vol
[inherited]
 

set a channel volume

Definition at line 465 of file jmixer.cpp.

bool Stream_mixer::stop_channel int  ch  )  [inherited]
 

stop the channel

Definition at line 496 of file jmixer.cpp.