1
/* This is part of the TuneNet XMP plugin
2
* written by Chris Young <chris@unsatisfactorysoftware.co.uk>
3
* based on an example plugin by Paul Heams
7
#include <proto/exec.h>
9
#include <utility/tagitem.h>
10
#include "include/proto/TNPlug.h"
13
#include "include/LibBase.h"
15
LONG _TNPlug_DecodeFramePlayer(struct TNPlugIFace *Self, struct TuneNet * inTuneNet, WORD * outbuffer)
17
struct TNPlugLibBase * MyBase = (struct TNPlugLibBase *)Self->Data.LibBase;
18
struct ExecIFace * IExec = MyBase->IExec;
23
if (inTuneNet && inTuneNet->handle)
25
if(xmp_player_frame((xmp_context)inTuneNet->handle) == 0)
27
xmp_get_buffer((xmp_context)inTuneNet->handle,&data,&size);
28
inTuneNet->pcm[0]= data;
29
inTuneNet->pcm[1]= (inTuneNet->pcm[0]+sizeof(WORD));
32
return (LONG)size/inTuneNet->dec_channels/sizeof(WORD); // ** Returning Zero assumes failure, otherwise return No of samples **