wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.78k stars 1.7k forks source link

[wxMac] wxSound QT implementation #6696

Closed wxtrac closed 2 years ago

wxtrac commented 19 years ago

Issue migrated from trac ticket # 6696

component: old wxOSX/Carbon port | priority: normal

2004-06-06 10:34:53: ryannpcs created the issue


There's also a bunch of ifdefs so that you can run it on quicktime windows sdk if you want (just peel out the header and source).

Testing on windows quicktime sdk and OS X Jaguar with the sound sample and several others (resources and unicode not tested).

build notes:

run notes:

-This can also be a problem - if a video is played qt will

create a new window and locate it at 0,0 with the width and height of the video. I didn't put anything in there because I'm assuming the user is not going to be playing videos with wxSound (You can put some asserts in there if you want). If you really want to you can call wxSound::GetHandle() with SetMovieGWorld and play a video in a wxWindow - such as.

An example if you really want it (s == wxSound*)-

//qt windows CreatePortAssociation(frame->GetHWND(), NULL, 0L); SetMovieGWorld((Movie) s->GetHandle(), (CGrafPtr) GetNativeWindowPort(frame->GetHWND()), nil);

//qt mac SetMovieGWorld((Movie) s->GetHandle(), (CGrafPtr) frame->GetHandle(), nil);

Note that quicktime on windows will go ok but quicktime on mac will crash and burn on the SetMovieGWorld call if the file doesn't contain any video.

wxtrac commented 19 years ago

2004-06-06 10:34:54: ryannpcs uploaded file soundsrc.patch (16.5 KiB)

changes to src\mac\carbon\sound.cpp

wxtrac commented 19 years ago

2004-06-06 10:37:38: ryannpcs uploaded file soundhead.patch (1.0 KiB)

changes to include\wx\mac\carbon\sound.h

wxtrac commented 19 years ago

2004-07-21 19:35:44: @csomor commented


applied, thanks a lot

Stefan