Operating System: WindowsXP
Libraries: BASS, slightly modified (to make the Result work)
Compiler: PURE FPC
Ok, well, I've been trying out different types of audio setups, and so far, this is what I've done, in BASS:
[pascal]
{$mode delphi}
program BassTest;
uses bass, crt;
var
x : integer;
error : ansistring;
volume : integer;
begin
error := '';
writeln('Stage 1: Initilization.');
BASS_Init(-1,22040,BASS_DEVICE_SPEAKERS,0,nil);
error := BASS_ErrorGetCode;
if error <> '' then writeln(error) else writeln('Initlization Completed Successfully!');
readkey;
writeln;
writeln('Stage 2: Check Volume.');
volume := BASS_GetVolume;
error := Bass_ErrorGetCode;
if error <> '' then writeln(error) else writeln('Volume Check completed successfully.');
readkey;
writeln;
Writeln('Stage 3: Set Volume.');
writeln('Type a number between 1 and 100 to set the volume. 0 mutes it.');
readln(x);
Bass_SetVolume(x);
error := bass_errorgetcode;
if error <> '' then writeln(error) else begin volume := bass_getvolume; writeln('Set Volume Successfully! Volume is now at: ',volume); end;
readkey;
writeln;
writeln('Stage 4: Load Music File');
bass_musicload(false,'D:\Music\If I Cant.mp3',0,0,BASS_MUSIC_AUTOFREE,0);
error := bass_errorgetcode;
if error <> '' then writeln(error) else writeln('Music loaded successfully!');
readkey;
writeln;
bass_free;
end.
[/pascal]
So, my problem being...
{The code in question is in Stage 4, loading music files, BASS_MusicLoad}Originally Posted by Bass Documentation
So, as you can see in my code, I have the parameter mem = FALSE. However, I get this annoying error message while trying to compile, yelling at me that the parameter #2 (file) must be a pointer, not an ansistring... So, I tried setting it true. No difference. I'm positive it's looking for something like...
$wholebunchofnumbers ($0040928234)
Maybe not, but is there some way to make it work? I can edit the BASS file, if needed....
Bookmarks