Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using flac library
#15
Quote:is this correct?

No.

Macro Flac_Def
Code:
Copy      Help
;constants
def xxx ...
;...

;types
type yyy ...
type FLAC__IOCallbacks read write seek tell eof close
;...

;functions
dll "Q:\Downloads\libFLAC_dynamic.dll"
,FLAC__StreamDecoderInitStatusString ...
,FLAC__FunctionThatCallsYourCallbacks ... FLAC__IOCallbacks*iocb ...
,...
,;Also you can declare the exported variables here.

;Don't need to declare callbacks. Just create functions with parameters etc that match the C callback declarations.

Function FLAC__IOCallback_Read
Code:
Copy      Help
function[c]int byte*ptr size nmemb handle

;your code here

Macro Macro272
Code:
Copy      Help
#compile Flac_Def

FLAC__StreamDecoderInitStatusString ...
;...

FLAC__IOCallbacks iocb
iocb.read=&FLAC__IOCallback_Read
iocb.write=...
;...

FLAC__FunctionThatCallsYourCallbacks ... &iocb ...
;...


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)