Changeset 4883 for pjproject


Ignore:
Timestamp:
Jul 28, 2014 1:43:22 AM (10 years ago)
Author:
ming
Message:

Re #1751 (misc): Fixed incorrect usage of dev_size (should be dev_count) in coreaudio device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-audiodev/coreaudio_dev.m

    r4751 r4883  
    434434 
    435435    /* Get all the audio device IDs */ 
    436     dev_ids = (AudioDeviceID *)pj_pool_calloc(cf->pool, dev_size, size); 
     436    dev_ids = (AudioDeviceID *)pj_pool_calloc(cf->pool, dev_count, size); 
    437437    if (!dev_ids) 
    438438        return PJ_ENOMEM; 
    439     pj_bzero(dev_ids, dev_count); 
    440439    ostatus = AudioObjectGetPropertyData(kAudioObjectSystemObject, &addr, 
    441440                                         0, NULL, 
     
    464463            AudioDeviceID temp_id = dev_ids[idx]; 
    465464             
    466             for (i = idx + 1; i < dev_size; i++) { 
     465            for (i = idx + 1; i < dev_count; i++) { 
    467466                if (dev_ids[i] == dev_id) { 
    468467                    dev_ids[idx++] = dev_id; 
     
    481480            AudioDeviceID temp_id = dev_ids[idx]; 
    482481             
    483             for (i = idx + 1; i < dev_size; i++) { 
     482            for (i = idx + 1; i < dev_count; i++) { 
    484483                if (dev_ids[i] == dev_id) { 
    485484                    dev_ids[idx] = dev_id; 
Note: See TracChangeset for help on using the changeset viewer.