From: Hajo Kirchhoff on
Declan McMullen wrote:
>
> Can anyone point me on the right track as to what Im doing wrong ?
> Am I missing some kind of casting ?
Check the function signature of your playAudioLayer function and compare
it with the example OnMediaLoaded function. It probably has different
parameters than a wxMediaEventFunction expects.

Regards

Hajo

From: Declan McMullen on
Seems to be the same
Sample:

void wxMediaPlayerFrame::OnMediaLoaded(wxMediaEvent& WXUNUSED(evt))
{
wxMediaPlayerNotebookPage* currentpage =
(wxMediaPlayerNotebookPage*) m_notebook->GetCurrentPage();

if( !currentpage->m_mediactrl->Play() )
{
wxMessageBox(wxT("Couldn't play movie!"));
currentpage->m_playlist->SetItem(currentpage->m_nLastFileId, 0,
wxT("E"));
}
else
{
currentpage->m_playlist->SetItem(currentpage->m_nLastFileId, 0,
wxT(">"));
}

}


Mine:

void LayerDialogFunction::playAudioLayer(wxMediaEvent& WXUNUSED(event))
{
ctrl->Play();
}


Its very weird. If I produce the binary on vista and run it it doesnt play
audio. But If I move that binary onto
and xp machine and run it it plays audio. Similarly If I produce the binary
on xp its fine. If I move that
binary to vista it doesnt play audio.

Its probably something simple im missing on vista.
If the sample didnt work on vista either its make things a whole lot clearer
:)


On Fri, Nov 7, 2008 at 4:20 PM, Hajo Kirchhoff <
mailinglists(a)hajo-kirchhoff.de> wrote:

> Declan McMullen wrote:
> >
> > Can anyone point me on the right track as to what Im doing wrong ?
> > Am I missing some kind of casting ?
> Check the function signature of your playAudioLayer function and compare
> it with the example OnMediaLoaded function. It probably has different
> parameters than a wxMediaEventFunction expects.
>
> Regards
>
> Hajo
>
> _______________________________________________
> wx-users mailing list
> wx-users(a)lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wx-users
>



--
http://www.computing.dcu.ie/~dmcmullen
declan.mcmullen(a)computing.dcu.ie
School of Computing
Postgrad Bay A
From: Hajo Kirchhoff on
Is your LayerDialogFunction class derived from wxEvtHandler? If not,
then that's your compile error and perhaps your Vista error as well.

wxMediaCtrl uses activex components which are a relative newcomer to
wxwidgets. It's entirely possible that changes to Vistas Media Player
compoments broke wxMediaCtrl. Try using svn-head (the latest wxWidgets
build) to see if that helps.

I know that there are several changes in there, because I had problems
with wxActiveX as well.

Regards

Hajo

Declan McMullen wrote:
> Seems to be the same
>
> Sample:
>
> void wxMediaPlayerFrame::OnMediaLoaded(wxMediaEvent& WXUNUSED(evt))
> {
> wxMediaPlayerNotebookPage* currentpage =
> (wxMediaPlayerNotebookPage*) m_notebook->GetCurrentPage();
>
> if( !currentpage->m_mediactrl->Play() )
> {
> wxMessageBox(wxT("Couldn't play movie!"));
> currentpage->m_playlist->SetItem(currentpage->m_nLastFileId, 0,
> wxT("E"));
> }
> else
> {
> currentpage->m_playlist->SetItem(currentpage->m_nLastFileId, 0,
> wxT(">"));
> }
>
> }
>
>
> Mine:
>
> void LayerDialogFunction::playAudioLayer(wxMediaEvent& WXUNUSED(event))
> {
> ctrl->Play();
> }
>
>
> Its very weird. If I produce the binary on vista and run it it doesnt
> play audio. But If I move that binary onto
> and xp machine and run it it plays audio. Similarly If I produce the
> binary on xp its fine. If I move that
> binary to vista it doesnt play audio.
>
> Its probably something simple im missing on vista.
> If the sample didnt work on vista either its make things a whole lot
> clearer :)
>
>
> On Fri, Nov 7, 2008 at 4:20 PM, Hajo Kirchhoff
> <mailinglists(a)hajo-kirchhoff.de <mailto:mailinglists(a)hajo-kirchhoff.de>>
> wrote:
>
> Declan McMullen wrote:
> >
> > Can anyone point me on the right track as to what Im doing wrong ?
> > Am I missing some kind of casting ?
> Check the function signature of your playAudioLayer function and compare
> it with the example OnMediaLoaded function. It probably has different
> parameters than a wxMediaEventFunction expects.
>
> Regards
>
> Hajo
>
> _______________________________________________
> wx-users mailing list
> wx-users(a)lists.wxwidgets.org <mailto:wx-users(a)lists.wxwidgets.org>
> http://lists.wxwidgets.org/mailman/listinfo/wx-users
>
>
>
>
> --
> http://www.computing.dcu.ie/~dmcmullen
> declan.mcmullen(a)computing.dcu.ie <mailto:declan.mcmullen(a)computing.dcu.ie>
> School of Computing
> Postgrad Bay A
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> wx-users mailing list
> wx-users(a)lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wx-users