Audio lags when video is started and video zooms
Hello. I run the following script on a HD2000, with a display connected to the VGA.
1 vm = CreateObject("roVideoMode") vm.SetMode("1024x768x60p") v = CreateObject("roVideoPlayer") v.SetAudioOutput(0) v.MapStereoOutput(2) a1 = CreateObject("roAudioPlayer") a1.SetAudioOutput(0) a1.MapStereoOutput(1) gpio = CreateObject("roGpioControlPort") p = CreateObject("roMessagePort") v.SetPort(p) a1.SetPort(p) gpio.SetPort(p) event_loop: 'Vent paa events msg=wait(0, p) if type(msg)="roGpioButton" then button = msg.GetInt() if button = 0 then ok = v.PlayFile("/dansk.avi") else if button = 1 then ok = v.PlayFile("/engelsk.avi") else if button = 2 then ok = v.PlayFile("/tysk.avi") REM AUDIO 1 else if button = 3 then ok = a1.PlayFile("/1_dansk.mp3") else if button = 4 then ok = a1.PlayFile("/1_engelsk.mp3") else if button = 5 then ok = a1.PlayFile("/1_tysk.mp3") endif endif clear_events: msg=p.GetMessage():if type(msg)<>"rotINT32" then clear_events goto event_loop [/code]
All is fine and dandy at first. But, if a sound is played through a1 and I start a video there is a little glitch in the audio. On the other hand, if a video is playing and i start some audio, the video is actually zoomed to the upper left corner, so some of the video is missing!