Changeset 2400

Show
Ignore:
Timestamp:
04/24/99 11:46:12 (15 years ago)
Author:
ucacoxh
Message:

- added make_microphone first port and it does. Bit of a hack, but can't stand
seeing MIDI come up as default port with soundblasters...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/auddev_win32.c

    r2399 r2400  
    735735} 
    736736 
     737/* XXX make_microphone_first_port is a hack to make microphone  
     738 * the first (default) port.  Of course this only works for 
     739 * english language drivers... 
     740 */ 
     741 
     742static int 
     743make_microphone_first_port(audio_port_details_t *ports, int n_ports) 
     744{ 
     745        audio_port_details_t tmp; 
     746        int i; 
     747         
     748        for(i = 1; i < n_ports; i++) { 
     749                if (!strncasecmp("mic", ports[i].name, 3)) { 
     750                        memcpy(&tmp, ports + i, sizeof(tmp)); 
     751                        memcpy(ports + i , ports, sizeof(ports[0])); 
     752                        memcpy(ports, &tmp, sizeof(ports[0])); 
     753                        return TRUE; 
     754                } 
     755        } 
     756 
     757        return FALSE; 
     758} 
     759 
    737760static int  
    738761mixSetup(UINT uMixer) 
     
    772795        } 
    773796         
     797        make_microphone_first_port(input_ports, n_input_ports); 
     798 
    774799        if (loop_ports != NULL) { 
    775800                xfree(loop_ports);