mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 01:39:20 +00:00
Update of linphone sound daemon to use MSFactory.
This commit is contained in:
parent
9b806bc2c3
commit
bad9aecc65
2 changed files with 8 additions and 9 deletions
|
|
@ -44,7 +44,7 @@ bool_t lsd_player_loop_enabled(const LsdPlayer *p);
|
|||
void lsd_player_set_gain(LsdPlayer *p, float gain);
|
||||
LinphoneSoundDaemon *lsd_player_get_daemon(const LsdPlayer *p);
|
||||
|
||||
LinphoneSoundDaemon * linphone_sound_daemon_new(const char *cardname, int rate, int nchannels);
|
||||
LinphoneSoundDaemon * linphone_sound_daemon_new(MSFactory* factory, const char *cardname, int rate, int nchannels);
|
||||
LsdPlayer * linphone_sound_daemon_get_player(LinphoneSoundDaemon *lsd);
|
||||
void linphone_sound_daemon_release_player(LinphoneSoundDaemon *lsd, LsdPlayer *lsdplayer);
|
||||
void linphone_sound_daemon_stop_all_players(LinphoneSoundDaemon *obj);
|
||||
|
|
|
|||
|
|
@ -115,11 +115,11 @@ int lsd_player_stop(LsdPlayer *p){
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void lsd_player_init(LsdPlayer *p, MSConnectionPoint mixer, MSFilterId playerid, LinphoneSoundDaemon *lsd){
|
||||
static void lsd_player_init(MSFactory* factory, LsdPlayer *p, MSConnectionPoint mixer, MSFilterId playerid, LinphoneSoundDaemon *lsd){
|
||||
MSConnectionHelper h;
|
||||
p->player=ms_filter_new(playerid);
|
||||
p->rateconv=ms_filter_new(MS_RESAMPLE_ID);
|
||||
p->chanadapter=ms_filter_new(MS_CHANNEL_ADAPTER_ID);
|
||||
p->player=ms_factory_create_filter(factory, playerid);
|
||||
p->rateconv=ms_factory_create_filter(factory,MS_RESAMPLE_ID);
|
||||
p->chanadapter=ms_factory_create_filter(factory,MS_CHANNEL_ADAPTER_ID);
|
||||
|
||||
ms_connection_helper_start(&h);
|
||||
ms_connection_helper_link(&h,p->player,-1,0);
|
||||
|
|
@ -220,16 +220,15 @@ void lsd_player_set_gain(LsdPlayer *p, float gain){
|
|||
ms_filter_call_method(p->lsd->mixer,MS_AUDIO_MIXER_SET_INPUT_GAIN,&gainctl);
|
||||
}
|
||||
|
||||
LinphoneSoundDaemon * linphone_sound_daemon_new(const char *cardname, int rate, int nchannels){
|
||||
LinphoneSoundDaemon * linphone_sound_daemon_new(MSFactory* factory, const char *cardname, int rate, int nchannels){
|
||||
int i;
|
||||
MSConnectionPoint mp;
|
||||
LinphoneSoundDaemon *lsd;
|
||||
MSSndCard *card=ms_snd_card_manager_get_card(
|
||||
ms_snd_card_manager_get(),
|
||||
MSSndCard *card=ms_snd_card_manager_get_card(ms_factory_get_snd_manager(factory),
|
||||
cardname);
|
||||
if (card==NULL){
|
||||
card=ms_snd_card_manager_get_default_playback_card (
|
||||
ms_snd_card_manager_get());
|
||||
ms_factory_get_snd_manager(factory));
|
||||
if (card==NULL){
|
||||
ms_error("linphone_sound_daemon_new(): No playback soundcard available");
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue