~ubuntu-branches/ubuntu/natty/linphone/natty

« back to all changes in this revision

Viewing changes to mediastreamer2/src/alsa.c

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram, Kilian Krause, Samuel Mimram
  • Date: 2007-12-05 11:24:25 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20071205112425-odfikcvg5j313rnl
Tags: 2.0.1-1
[ Kilian Krause ]
* New upstream release.
* Conflict with libortp5-dev to fix conflicting file
  (/usr/include/ortp/event.h). (Closes: #454281)

[ Samuel Mimram ]
* liblinphone2-dev conflicts with liblinphone1-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
483
483
        if (ad->mixdev!=NULL) ms_free(ad->mixdev);
484
484
}
485
485
 
486
 
 
487
486
static void alsa_card_detect(MSSndCardManager *m){
488
487
        int i;
489
488
        for (i=-1;i<10;i++){
516
515
        return obj;
517
516
}
518
517
 
 
518
MSSndCard * ms_alsa_card_new_custom(const char *pcmdev, const char *mixdev){
 
519
        MSSndCard * obj;
 
520
        AlsaData *ad;
 
521
        obj=ms_snd_card_new(&alsa_card_desc);
 
522
        ad=(AlsaData*)obj->data;
 
523
        obj->name=ms_strdup(pcmdev);
 
524
        ad->pcmdev=ms_strdup(pcmdev);
 
525
        ad->mixdev=ms_strdup(mixdev);
 
526
        return obj;
 
527
}
 
528
 
519
529
static MSSndCard * alsa_card_new(int id)
520
530
{
521
531
        MSSndCard * obj;
542
552
                pos2=pos1+strlen(pos1)-1;
543
553
                for (; pos2>pos1 && *pos2==' '; pos2--) *pos2='\0';
544
554
                obj->name=pos1;
545
 
                ad->pcmdev=ms_strdup_printf("plughw:%i,0",id);
546
 
                ad->mixdev=ms_strdup_printf("hw:%i",id);
 
555
                ad->pcmdev=ms_strdup_printf("default:%i",id);
 
556
                ad->mixdev=ms_strdup_printf("default:%i",id);
547
557
        }
548
558
        free(name);
549
559
        /*ms_message("alsa device %s found",obj->name);*/