AC
Sat Jun 14 10:39:20 PDT 2008
Thanks again for your reply.
But just realised that I missed your point in your first reply..."If the MP3
player is in the AVRCP Target role, you can create a message queue and read
the AvrcpMsg structure..."
How do I make my MP3 player as the AVRCP Target role?
Cheers,
A_C
"CEAssist" <CEAssist@discussions.microsoft.com> ...
> You can try calling CreateMsgQueue with a MSQQUEUEOPTIONS strcture that
> has
> all the correct member values. Depending on how you want to implement,
> this
> structure definiton could be something similar to:
>
> MSGQUEUEOPTIONS option;
> memset ( &option, 0, sizeof ( MSGQUEUEOPTIONS ) );
> option.dwSize = sizeof ( MSGQUEUEOPTIONS );
> option.dwFlags = MSGQUEUE_ALLOW_BROKEN ;
> option.dwMaxMessages = 0;
> option.cbMaxMessage = sizeof ( AvrcpMsg );
> option.bReadAccess = TRUE;
>
> HANDLE hMsgQueue = CreateMsgQueue( NULL, &option );
>
>
http://msdn.microsoft.com/en-us/library/aa909023.aspx - and you also need
> SYSTEM_MSGQUEUE in your image.
>
>
> Hope it helps!
>
>
> "AC" wrote:
>
>> Thanks CEAssist.
>>
>> But what should be the parameters of "CreateMsgQueue" so that the
>> AvrcpMsg
>> can be read?
>>
>> Cheers,
>> A_C
>> "CEAssist" <CEAssist@discussions.microsoft.com>
>> :69827B46-DDCA-448F-A9CE-C332A271F7CF@microsoft.com...
>> > If the MP3 player is in the AVRCP Target role, you can create a message
>> > queue
>> > and read the AvrcpMsg structure after AVRCP writes it to the queue. The
>> > AvrcpMsg represents a command from the Controller device.
>> >
>> > AvrcpMsg.opCode - this is set to a member of the AVOpCodes enumeration.
>> > When
>> > this is set to PassThru_t, then AvrcpMsg.opId contains the ID of a
>> > command
>> > to
>> > respond to.
>> > AvrcpMsg.opId - this is set to a member in the PassThruOpId
>> > enumeration,
>> > and
>> > the supported commands are Play_t, Stop_t, Pause_t, FastFwd_t,
>> > Rewind_t,
>> > Forward_t, or Backward_t.
>> >
>> > When you get the AvrcpMsg structure in your message queue, you can
>> > handle
>> > it
>> > by using Audio functions that correspond to the command you got.
>> >
>> >
>> >
http://msdn.microsoft.com/en-us/library/aa909023.aspx
>> >
>> >
>> > "AC" wrote:
>> >
>> >> Hi,
>> >>
>> >> I'm developing a simple MP3 player and want to have AVRCP support.
>> >> I've
>> >> found some information of AVRCP at MSDN
>> >> (
http://msdn2.microsoft.com/en-us/library/aa916569.aspx), but I don't
>> >> know
>> >> how/when to make use of the AVCOpCodes, PassThruOpId & AvrcpMsg.
>> >>
>> >> Could anyone point me the direction how to get this done?
>> >>
>> >> Thanks.
>> >> A_C
>> >>
>> >>
>> >
>>
>>
>>