Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#2

AW: Stream mit bass.dll

  Alt 12. Apr 2015, 16:00
Ich denke mal das es daran liegt das du hier mit repeat arbeitest
es wäre besser wenn du die dafür vorgesehene Callback verwendest.

Warum einen eigenen Thread?

Siehe!
Delphi-Quellcode:
  RECORDPROC = function(handle: HRECORD; buffer: Pointer; length: DWORD; user: Pointer): BOOL; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  {
    Recording callback function.
    handle : The recording handle
    buffer : Buffer containing the recorded sample data
    length : Number of bytes
    user  : The 'user' parameter value given when calling BASS_RecordStart
    RETURN : TRUE = continue recording, FALSE = stop
  }
und oder
Delphi-Quellcode:
  DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: Pointer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  {
    Internet stream download callback function.
    buffer : Buffer containing the downloaded data... NULL=end of download
    length : Number of bytes in the buffer
    user  : The 'user' parameter value given when calling BASS_StreamCreateURL
  }
Delphi-Quellcode:
  // callback function types
  STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: Pointer): DWORD; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  {
    User stream callback function. NOTE: A stream function should obviously be as
    quick as possible, other streams (and MOD musics) can't be mixed until
    it's finished.
    handle : The stream that needs writing
    buffer : Buffer to write the samples in
    length : Number of bytes to write
    user  : The 'user' parameter value given when calling BASS_StreamCreate
    RETURN : Number of bytes written. Set the BASS_STREAMPROC_END flag to end
            the stream.
  }
Diese Funktionen sind extra dafür angelegt.

gruss

Geändert von EWeiss (12. Apr 2015 um 16:02 Uhr)
  Mit Zitat antworten Zitat