Re: #3145: Mac wxMediaCtrl::SetVolume() fails when not playing

4 views
Skip to first unread message

wxTrac

unread,
Nov 10, 2012, 11:47:12 PM11/10/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:5>

#3145: Mac wxMediaCtrl::SetVolume() fails when not playing
---------------------------+------------------------------------------------
Reporter: ost12666 | Owner: csomor
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxOSX-Carbon | Version:
Resolution: | Keywords:
Blockedby: | Patch: 0
Blocking: |
---------------------------+------------------------------------------------

Comment(by oneeyeman):

I tried to test this ticket on the recent TRUNK with Cocoa build.

There is no failure nor error running mediactrl sample.

Can be closed.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:5>

wxTrac

unread,
Nov 11, 2012, 7:57:36 AM11/11/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:6>

#3145: Mac wxMediaCtrl::SetVolume() fails when not playing
----------------------------------+-----------------------------------------
Reporter: ost12666 | Owner: csomor
Type: defect | Status: confirmed
Priority: low | Milestone:
Component: wxOSX (any toolkit) | Version:
Resolution: | Keywords:
Blockedby: | Patch: 0
Blocking: |
----------------------------------+-----------------------------------------
Changes (by vadz):

* priority: normal => low
* component: wxOSX-Carbon => wxOSX (any toolkit)


Comment:

AFAICS the mediaplayer sample doesn't do what this patch describes, i.e.
doesn't call `SetVolume()` before creating the backend. So how is this
comment relevant to closing the bug?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:6>

wxTrac

unread,
Nov 11, 2012, 6:41:37 PM11/11/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:7>

#3145: Mac wxMediaCtrl::SetVolume() fails when not playing
----------------------------------+-----------------------------------------
Reporter: ost12666 | Owner: csomor
Type: defect | Status: confirmed
Priority: low | Milestone:
Component: wxOSX (any toolkit) | Version:
Resolution: | Keywords:
Blockedby: | Patch: 0
Blocking: |
----------------------------------+-----------------------------------------

Comment(by oneeyeman):

Vadim,

I modified the sample as follows:

{{{

    //

    //  Create our media control

    //

    m_mediactrl = new wxMediaCtrl();

+    m_mediactrl->!SetVolume( 0.0 );

    //  Make sure creation was successful

    bool bOK = m_mediactrl->Create(this, wxID_MEDIACTRL, wxEmptyString,

                                    wxDefaultPosition, wxDefaultSize, 0,

// you could specify a macro backend here like

//  wxMEDIABACKEND_WMP10);

//        wxT("wxPDFMediaBackend"));

                                   szBackend);

}}}Now, compiling and running it does not produce any errors.Please let me
know if this is not enough.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:7>

wxTrac

unread,
Nov 12, 2012, 7:58:37 AM11/12/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:8>

#3145: Mac wxMediaCtrl::SetVolume() fails when not playing
----------------------------------+-----------------------------------------
Reporter: ost12666 | Owner: csomor
Type: defect | Status: confirmed
Priority: low | Milestone:
Component: wxOSX (any toolkit) | Version:
Resolution: | Keywords:
Blockedby: | Patch: 0
Blocking: |
----------------------------------+-----------------------------------------

Comment(by vadz):

Does it change the sound volume?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:8>

wxTrac

unread,
Dec 2, 2012, 2:03:20 AM12/2/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:9>

#3145: Mac wxMediaCtrl::SetVolume() fails when not playing
----------------------------------+-----------------------------------------
Reporter: ost12666 | Owner: csomor
Type: defect | Status: confirmed
Priority: low | Milestone:
Component: wxOSX (any toolkit) | Version:
Resolution: | Keywords:
Blockedby: | Patch: 0
Blocking: |
----------------------------------+-----------------------------------------

Comment(by oneeyeman):

Vadim,

I just did a quick test with the latest TRUNK Cocoa build.

1. With the patch from my comment.

a. Compile and run the sample.

b. Open the sound file.

c. Listen to the audio.

2. Insert the line with the SetVolume() after the call to Create().

a. Compile and run the sample

b. Open the sound file.

c. Listen to the audio.

In both cases the audio was produced and I could hear it.

So it might be the restrictions on the underlying QuickTime control.

I'll try to debug and and see, but I have very limited Mac/Cocoa
knowledge...


--
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:9>

wxTrac

unread,
Dec 2, 2012, 3:03:01 AM12/2/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:10>

#3145: Mac wxMediaCtrl::SetVolume() fails when not playing
----------------------------------+-----------------------------------------
Reporter: ost12666 | Owner: csomor
Type: defect | Status: confirmed
Priority: low | Milestone:
Component: wxOSX (any toolkit) | Version:
Resolution: | Keywords:
Blockedby: | Patch: 0
Blocking: |
----------------------------------+-----------------------------------------

Comment(by oneeyeman):

According
to https://developer.apple.com/library/mac/#documentation/quicktime/Reference/QTKitFramework/Classes/QTMovie_Class/Reference/Reference.html

the setVolume function does not affect the movie’s stored settings.

I read it as such:

If I have a sound file or movie which produces sound, I can't select the
volume with which it will be played.

But I'm certainly not an expert on QuickTime/Cocoa programming, so any
comment from Stefan would be helpful.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/3145#comment:10>
Reply all
Reply to author
Forward
0 new messages