mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
allow setting of output audio format in LinphoneSoundDaemon
This commit is contained in:
parent
6cc2bfad9e
commit
b448d5a9af
3 changed files with 5 additions and 5 deletions
|
|
@ -41,7 +41,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);
|
||||
LinphoneSoundDaemon * linphone_sound_daemon_new(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_core_use_sound_daemon(LinphoneCore *lc, LinphoneSoundDaemon *lsd);
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ 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){
|
||||
LinphoneSoundDaemon * linphone_sound_daemon_new(const char *cardname, int rate, int nchannels){
|
||||
int i;
|
||||
MSConnectionPoint mp;
|
||||
LinphoneSoundDaemon *lsd;
|
||||
|
|
@ -238,8 +238,8 @@ LinphoneSoundDaemon * linphone_sound_daemon_new(const char *cardname){
|
|||
lsd=ms_new0(LinphoneSoundDaemon,1);
|
||||
lsd->soundout=ms_snd_card_create_writer(card);
|
||||
lsd->mixer=ms_filter_new(MS_AUDIO_MIXER_ID);
|
||||
lsd->out_rate=44100;
|
||||
lsd->out_nchans=2;
|
||||
lsd->out_rate=rate;
|
||||
lsd->out_nchans=nchannels;
|
||||
ms_filter_call_method(lsd->soundout,MS_FILTER_SET_SAMPLE_RATE,&lsd->out_rate);
|
||||
ms_filter_call_method(lsd->soundout,MS_FILTER_SET_NCHANNELS,&lsd->out_nchans);
|
||||
ms_filter_call_method(lsd->mixer,MS_FILTER_SET_SAMPLE_RATE,&lsd->out_rate);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
linphone_core_enable_logs(stdout);
|
||||
lc=linphone_core_new(&vtable,NULL,NULL,NULL);
|
||||
lsd=linphone_sound_daemon_new (NULL);
|
||||
lsd=linphone_sound_daemon_new (NULL,44100,1);
|
||||
|
||||
linphone_core_use_sound_daemon(lc,lsd);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue