Invalid handle, PlayStreamed with Set3DPosition (Incognito's Audio Plugin)
#1

pawn Код:
public Audio_OnPlay(playerid, handleid)
{
    handleid = playerVariables[playerid][pAudioHandle];
    return 1;
}

stock Function(playerid)
{
    Audio_PlayStreamed(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=656213", false, false, true);
    Audio_Set3DPosition(playerid, playerVariables[playerid][pAudioHandle], playerPos[0], playerPos[1], playerPos[2], 50.0);
    return 1;
}
It gives me this error in the client logs:

Quote:

"Error creating mixer for playback of "http://yp.shoutcast.com/sbin/tunein-station.pls?id=656213": Invalid handle"

Reply
#2

this
Код:
public Audio_OnPlay(playerid, handleid)
{
    handleid = playerVariables[playerid][pAudioHandle];
    return 1;
}
to

Код:
public Audio_OnPlay(playerid, handleid)
{
    playerVariables[playerid][pAudioHandle] = handleid;
    return 1;
}
maybe you mean this?

When Audio_OnPlay is called?
Reply
#3

Yeah-.. right, failed.

But the error persists, just tried:
Quote:

[21:50:56] Error creating mixer for playback of "http://yp.shoutcast.com/sbin/tunein-station.pls?id=656213": Invalid handle

Reply
#4

When you call the function, Audio_OnPlay has already been called? Are you sure?

Add a debug in Audio_OnPlay, and debug the playerVariables[playerid][pAudioHandle] inside Function ( .. ) with the value

Код:
printf("handle value: %d", playerVariables[playerid][pAudioHandle]);
    Audio_Set3DPosition(playerid, playerVariables[playerid][pAudioHandle], playerPos[0], playerPos[1], playerPos[2], 50.0);
Reply
#5

Quote:

[22:09:11] Handle in Callback: 1
[22:09:12] Handle in Function: 1

As you can see, it's called before the function.

EDIT: Apparently, it's fixed.
Quote:

[22:09:11] Streaming: "http://yp.shoutcast.com/sbin/tunein-station.pls?id=656213"
[22:09:11] Listening to: "RADIOUP.COM - THE HITLIST - #1 FOR ALL HIT MUSIC"
[22:09:11] Playing: "Chris Brown - Fine China"
[22:09:16] Playing: "~+ (147) Radioup.com Sweeper +~ - ~+ (147) (fem) All The Hits! - The Hitlist Radioup.com +~"
[22:09:20] Playing: "Avril Lavigne - Here's To Never Growing Up"

Thank you.
Reply
#6

Audio_PlayStreamed returns an handle, maybe you should use the handle returned by Audio_PlayStreamed.

Код:
stock Function(playerid)
{
        Audio_Set3DPosition(playerid, Audio_PlayStreamed(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=656213", false, false, true)
, playerPos[0], playerPos[1], playerPos[2], 50.0);
    return 1;
}
try this
Reply
#7

It's fixed, thank you anyway
Reply
#8

I think the gamemode is having fun of me. It doesn't work anymore, what the fuck? Same error.

I tried your method ReVo_, but it doesn't work.
Reply
#9

I think the url is the problem, try with another url.
Reply
#10

Same error.

Quote:

[23:01:04] Error creating mixer for playback of "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1564322": Invalid handle

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)