Changeset 153

Show
Ignore:
Timestamp:
10/07/06 17:17:56 (2 years ago)
Author:
dconrad
Message:

Override the default information about a codec that the Audio Toolbox gives us, since it's probably more accurate. Closes #35

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ff_private.c

    r98 r153  
    198198        AudioFormatGetProperty(kAudioFormatProperty_FormatIsVBR, sizeof(AudioStreamBasicDescription), &asbd, &ioSize, &map->vbr); 
    199199         
     200        /* ask the toolbox about more information */ 
     201        ioSize = sizeof(AudioStreamBasicDescription); 
     202        AudioFormatGetProperty(kAudioFormatProperty_FormatInfo, 0, NULL, &ioSize, &asbd); 
     203         
    200204        /* Set some fields of the AudioStreamBasicDescription. Then ask the AudioToolbox 
    201205                * to fill as much as possible before creating the SoundDescriptionHandle */ 
     
    211215        if (asbd.mBytesPerPacket == 0 && asbd.mFramesPerPacket == 0) 
    212216                asbd.mFramesPerPacket = 1; 
    213          
    214         /* ask the toolbox about more information */ 
    215         ioSize = sizeof(AudioStreamBasicDescription); 
    216         AudioFormatGetProperty(kAudioFormatProperty_FormatInfo, 0, NULL, &ioSize, &asbd); 
    217217         
    218218        /* If we have vbr audio, the media scale most likely has to be set to the time_base denumerator */