Hello,
I need to burn an audio track from data located in a pipe.
I'm using delphi and i called the function TrackAtOnceFromPipe, but always a data track is created. I have tried wav and mp3 files.
When i use TrackAtOnceFromFile everything works fine.
The help says that a sound file can be burned with TrackAtOnceFromPipe.
Please help me, what am I doing wrong? My code looks like this:
Code:
// create pipe
FillChar ( SecurityAttr , SizeOf ( TSecurityAttributes ) , 0 ) ;
SecurityAttr . nLength := SizeOf ( SecurityAttr ) ;
SecurityAttr . bInheritHandle := true ;
SecurityAttr . lpSecurityDescriptor := nil ;
CreatePipe ( HRead , HWrite , @SecurityAttr , cBufferSize ) ;
// read data from file into buffer
Assign ( F , 'C:\test.mp3' ) ;
Reset ( F , 1 ) ;
DataSize := FileSize ( F ) ;
SetLength ( DataBuffer , DataSize ) ;
BlockRead ( F , DataBuffer [ 0 ] , DataSize ) ;
Close ( F ) ;
// write buffer to pipe
WriteFile ( HWrite , DataBuffer [ 0 ] , DataSize , a , nil ) ;
// burn track
l__EXCEPTION_NUMBER :=
StarBurn_CdvdBurnerGrabber_TrackAtOnceFromPipe(
l__PVOID__CdvdBurnerGrabber,
PCHAR( @l__CHAR__ExceptionText[1] ),
sizeof( l__CHAR__ExceptionText ),
l__ULONG__Status,
@l__CDB_FAILURE_INFORMATION,
HRead,
DataSize,
FALSE ,
l__BOOLEAN__IsTestWrite,
TRUE,
WRITE_REPORT_DELAY_IN_SECONDS,
BUFFER_STATUS_REPORT_DELAY_IN_SECONDS
);
Greetings,
Sven