Show
Ignore:
Timestamp:
02/19/10 21:07:32 (2 years ago)
Author:
gbooker
Message:

Moved the setting of the SPDIF device to initiate playback since this is after the controller has a chance to set the pref instead of before.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/PlayerFramework/CommonMediaPlayer/Media Players/DVD Framework/CMPDVDPlayer.m

    r1147 r1151  
    686686- (void)initiatePlaybackWithResume:(BOOL *)resume; 
    687687{ 
     688        DVDAudioMode audioMode = 0; 
     689        //See if we can go SPDIF 
     690        OSStatus SPDIFresult = DVDGetAudioOutputModeCapabilities(&audioMode); 
     691        NSLog(@"SPDIF get is %d with mode %d", SPDIFresult, audioMode); 
     692        if(audioMode & kDVDAudioModeSPDIF) 
     693        { 
     694                //Engage the SPDIF interface 
     695                SPDIFresult = DVDSetAudioOutputMode(kDVDAudioModeSPDIF); 
     696                NSLog(@"Set to SPDIF with result %d", SPDIFresult); 
     697                SPDIFresult = DVDSetSPDIFDataOutDevice(0); 
     698                NSLog(@"Set SPDIF device with result %d", SPDIFresult); 
     699        }        
     700         
    688701        DVDGetNumTitles(&titleCount); 
    689702        BOOL doingResume = titleCount == 1 && resumeTime != 0; 
     
    10791092                        return NO; 
    10801093        } 
    1081         if(result == noErr) 
    1082         { 
    1083                 DVDAudioMode audioMode = 0; 
    1084                 //See if we can go SPDIF 
    1085                 OSStatus SPDIFresult = DVDGetAudioOutputModeCapabilities(&audioMode); 
    1086                 NSLog(@"SPDIF get is %d with mode %d", SPDIFresult, audioMode); 
    1087                 if(audioMode & kDVDAudioModeSPDIF) 
    1088                 { 
    1089                         //Engage the SPDIF interface 
    1090                         SPDIFresult = DVDSetAudioOutputMode(kDVDAudioModeSPDIF); 
    1091                         NSLog(@"Set to SPDIF with result %d", SPDIFresult); 
    1092                         SPDIFresult = DVDSetSPDIFDataOutDevice(0); 
    1093                         NSLog(@"Set SPDIF device with result %d", SPDIFresult); 
    1094                 } 
    1095         } 
    10961094        return result == noErr; 
    10971095}