Hello
Problem the 10th and 100th through the STREAM and STREAM through MIXER.
That is not correct.
I want to read out the stream in the MIXER.
Not the position of the stream in the mixer.
Sample:
function TfrmMainForm.UpdateTimeLoopStream: string;
var
CurrentBytes: Cardinal;
PlayingTime: Double;
bHours, bMinutes, bSeconds, bFractions: Cardinal;
begin
CurrentBytes := BASS_ChannelGetPosition(DefaultStream, BASS_POS_BYTE);
PlayingTime := BASS_ChannelBytes2Seconds(DefaultStream, CurrentBytes);
AT_BASSSec2TimeExt(BASSDoubleToCardinal17(PlayingTime), bHours, bMinutes, bSeconds, bFractions);
Result := Format('%.2d:%.2d.%.2d', [bMinutes, bSeconds, bFractions]);
end;
// GOOD:
DefaultStream := BASS_StreamCreateFile(False, PChar('Andy Gibb - Desire.mp3'), 0, 0, BASS_SAMPLE_FLOAT or BASS_UNICODE);
BASS_ChannelPlay(DefaultStream, False);
// TIMER: UpdateTimeLoopStream
// STRANGE 10e fractions
DefaultStream := BASS_StreamCreateFile(False, PChar('Andy Gibb - Desire.mp3'), 0, 0, BASS_SAMPLE_FLOAT or BASS_STREAM_DECODE or BASS_UNICODE);
MixerStream := BASS_Mixer_StreamCreate(44100, 2, BASS_UNICODE or BASS_SAMPLE_FLOAT);
BASS_Mixer_StreamAddChannel(MixerStream, DefaultStream, BASS_MIXER_CHAN_BUFFER or BASS_MIXER_CHAN_NORAMPIN);
BASS_ChannelPlay(MixerStream, True);
// Timer: UpdateTimeLoopStream
This is working but I don't want that?
CurrentBytes := BASS_Mixer_ChannelGetPosition(DefaultStream, BASS_POS_BYTE);
PlayingTime := BASS_ChannelBytes2Seconds(DefaultStream, CurrentBytes);
Maybe some help or is this not possible?
Regards,
Eduard.