0
Next. I was using bass.dll without any problem. But when I try to use the attributes of bass_fx.dll, the bass does not recognize. I performed the installation of the two dlls as follows.
1- I copied the dlls to the exe folder.
2- I added to the project the respective Units duly updated, newly downloaded from the un4seen website.
Follows the code:
program BassFXTest;
uses
Vcl.Forms,
Vcl.Dialogs,
SysUtils,
Variants,
bass in 'Bass\bass.pas',
bass_fx in 'Bass\bass_fx.pas';
var
Form : TForm;
Channel : HChannel;
Sample : HSample;
Filename : PChar;
begin
Application.Initialize;
filename := PChar('sample.ogg');
Application.MainFormOnTaskBar := true;
Application.CreateForm(TForm, Form);
if not Bass_Init(-1, 44100, 0, 0, nil) then
ShowMessage('Error initing (' + IntToStr(Bass_ErrorGetCode) + ').');
Sample := Bass_SampleLoad(false, filename, 0, 0, 1000, BASS_UNICODE);
if Sample = 0 then
ShowMessage('Error loading sample (' + IntToStr(Bass_ErrorGetCode) + ').');
Channel := Bass_SampleGetChannel(Sample, false);
if Channel = 0 then
ShowMessage('Error creating Channel (' + IntToStr(Bass_ErrorGetCode) + ').');
if not BASS_ChannelSetAttribute(Channel, BASS_ATTRIB_VOL, 1) then
ShowMessage('Error VOL (' + IntToStr(Bass_ErrorGetCode) + ').');
if not BASS_ChannelSetAttribute(Channel, BASS_ATTRIB_TEMPO_PITCH, 3) then
ShowMessage('Error PITCH (' + IntToStr(Bass_ErrorGetCode) + ').');
if not BASS_ChannelPlay(Channel, True) then
ShowMessage('Error Playing Channel (' + IntToStr(Bass_ErrorGetCode) + ').');
Application.Run;
end.
The above code reproduces the sample, but does not recognize the attribute BASS_ATTRIB_TEMPO_PITCH
it only shows the "Error PITCH (19)." message; error which according to the bass documentation means that the attribute does not exist. But according to the bass_fx documentation, this attribute is correct. Where can the error be? Am I installing bass_fx the wrong way?
tempostream, decoder : HStream
?– Guill
The program here, launches an "Application Error". If I run without the line
tempostream := BASS_FX_TempoCreate(decoder, BASS_FX_FREESOURCE);
it rotates, but it comes under my exceptions.– Guill