|
Ian @ un4seen
Administrator
Posts: 15259
|
 |
« Reply #100 on: 18 Nov '11 - 16:23 » |
Quote
|
Is sample loading from disk via BASS_SampleLoad (with mem=FALSE) working OK? If so, please confirm what sort of file you are attempting to load from memory, and how it's getting there, eg. are you loading an existing file to memory or generating it yourself? If the latter, please also confirm how you are doing that.
|
|
|
|
|
Logged
|
|
|
|
|
ykot
Posts: 3
|
 |
« Reply #101 on: 18 Nov '11 - 17:03 » |
Quote
|
Ian, thank you for the answer. I've tried saving the sample to disk first and loading and it failed, but that's how I found the problem - the sample itself was wrong. I was generating AIFF sample and the issue was in 80-bit floating-point sample rate, which on x64 used 64-bit format. Now everything works as it should, thanks again! 
|
|
|
|
|
Logged
|
|
|
|
|
400lb Gorilla
Posts: 4
|
 |
« Reply #102 on: 29 Nov '11 - 06:00 » |
Quote
|
I'm having a problem with bassmix 64-bit (2.4.5.2 contained in the zip which I believe is the latest) in comparison with the 32-bit (2.4.6.0) version. The 32-bit version works fine, but the 64-bit plays static or nothing at all after setting the channel matrix. Is there something I should be doing differently for 64-bit? I'm using vb.net, but not bass.net, with the following code: Protected Declare Auto Function BASS_Mixer_ChannelSetMatrix Lib "bassmix.dll" (ByVal handle As Integer, ByRef matrix As Single) As Boolean
... Dim hChannel, hMixer As Integer Dim CI As BASS_CHANNELINFO hChannel = BASS_StreamCreateFile(False, "D:testfile-2channels.mp3", 0, 0, BASS_UNICODE Or BASS_STREAM_DECODE) BASS_ChannelGetInfo(hChannel, CI) hMixer = BASS_Mixer_StreamCreate(CI.freq, 2, BASS_MIXER_END) BASS_Mixer_StreamAddChannel(hMixer, hChannel, BASS_MIXER_MATRIX) BASS_ChannelPlay(hMixer, False)
Dim Matrix(,) As Single = {{0, 0}, {1, 1}} 'play right speaker only BASS_Mixer_ChannelSetMatrix(hChannel, Matrix(0, 0))
I'm still trying to get a handle on bassmix, so any help or ideas would be greatly appreciated.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15259
|
 |
« Reply #103 on: 29 Nov '11 - 15:34 » |
Quote
|
Does the problem only happen after calling BASS_Mixer_ChannelSetMatrix, and not if you just use the BASS_MIXER_MATRIX flag without making that call? If so, perhaps there is a problem in how the matrix is being passed in the call. What do you get if you call BASS_Mixer_ChannelGetMatrix afterwards, eg. do you get back the same matrix?
|
|
|
|
|
Logged
|
|
|
|
|
400lb Gorilla
Posts: 4
|
 |
« Reply #104 on: 29 Nov '11 - 19:03 » |
Quote
|
Does the problem only happen after calling BASS_Mixer_ChannelSetMatrix, and not if you just use the BASS_MIXER_MATRIX flag without making that call? That is correct. It plays fine using the BASS_MIXER_MATRIX flag; it's only after the SetMatrix call that I get no sound or static. If so, perhaps there is a problem in how the matrix is being passed in the call. What do you get if you call BASS_Mixer_ChannelGetMatrix afterwards, eg. do you get back the same matrix?
I did a quick test using a 2-channel music file outputting to two speakers with a matrix of { {0,1}, {1,0} }. Using the 32-bit version (v2.4.6.0 with Bass v2.4.8.1), the SetMatrix call returned True and mixed correctly. A GetMatrix call returned the same values I used with SetMatrix. The 64-bit version (v2.4.5.2 with Bass v2.4.8.2), the SetMatrix call returned True but all sound stopped in all speakers; complete silence. A GetMatrix call returned an array with all zeros. I'm not sure what I'm doing wrong. If my declaration is wrong for 64-bit, or if the version of bassmix.dll is causing the problems, or something else completely.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15259
|
 |
« Reply #105 on: 30 Nov '11 - 17:05 » |
Quote
|
I ran some tests on Win64 just now, and BASS_Mixer_ChannelSetMatrix appears to be working fine. So I think the problem must be in how the matrix is getting from VB.Net to BASSmix. I'm afraid I'm not very familiar with VB.Net, so I'm not sure how BASS_Mixer_ChannelSetMatrix should be declared there. Perhaps one thing you could try is to flatten the matrix to a single-dimension array, eg. "{{0, 0}, {1, 1}}" would become "{0, 0, 1, 1}". I have also placed the latest BASSMIX.DLL version (2.4.6) in the Win64 package (in the 1st post). It doesn't include any changes to the matrix stuff, so I don't expect it to help with this issue, but it does include some other tweaks/fixes, so still worth updating 
|
|
|
|
|
Logged
|
|
|
|
|
400lb Gorilla
Posts: 4
|
 |
« Reply #106 on: 30 Nov '11 - 19:16 » |
Quote
|
Fixed it. My declaration should have been:
Protected Declare Auto Function BASS_Mixer_ChannelSetMatrix Lib "bassmix.dll" (ByVal handle As Integer, ByVal matrix As Single(,)) As Boolean
The matrix should passed ByVal, not ByRef, as a 2-dimensional array. I was trying to convert the old vb6 example code which works, but only for 32-bit. This works everywhere.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #107 on: 30 Nov '11 - 20:11 » |
Quote
|
Why don't you use Bass.Net together with VB.Net - then all should be there.
|
|
|
|
|
Logged
|
|
|
|
|
400lb Gorilla
Posts: 4
|
 |
« Reply #108 on: 30 Nov '11 - 21:12 » |
Quote
|
Why don't you use Bass.Net together with VB.Net - then all should be there.
That's good advice, and I can no longer even remember the reason I avoided bass.net when I started the project. Everything is working now, but I could have saved quite a few hours by not reinventing the wheel. Maybe this cautionary tale will be useful to someone else just starting out.
|
|
|
|
|
Logged
|
|
|
|
|
jellos
Posts: 2
|
 |
« Reply #109 on: 25 Dec '11 - 22:04 » |
Quote
|
Where must i place the files?
|
|
|
|
|
Logged
|
|
|
|
|
gnag
Posts: 160
|
 |
« Reply #110 on: 25 Dec '11 - 22:50 » |
Quote
|
Where must i place the files?
You place the Bass.dll always in the same folder as your project Exe , it will be the Debug folder I think.
|
|
|
|
|
Logged
|
|
|
|
|
Silhwan
Posts: 81
|
 |
« Reply #111 on: 24 Jan '12 - 21:15 » |
Quote
|
I do not know whether anoyone reported this problem for Delphi XE2 users. Anyway I found that the BASS_PLUGINFORM structure should be modified as follows, BASS_PLUGINFORM = record ctype: DWORD; // channel type {$IFDEF CPUX64} dummy: DWORD; // ** Should be added for 64bit mode {$ENDIF} name: PAnsiChar; // format description exts: PAnsiChar; // file extension filter (*.ext1;*.ext2;etc...) end;
else Delphi XE2 users will get access violation error at executing BASS_PluginGetInfo (for the case Target platform = 64-bit windows).
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15259
|
 |
« Reply #112 on: 25 Jan '12 - 13:26 » |
Quote
|
Thanks for that. An updated BASS.PAS file is up in the BASS package now.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15259
|
 |
« Reply #113 on: 9 Feb '12 - 13:48 » |
Quote
|
The Win64 version of the latest BASSENC.DLL (2.4.9) is now up in the 1st post.
|
|
|
|
|
Logged
|
|
|
|
|
Silhwan
Posts: 81
|
 |
« Reply #114 on: 10 Mar '12 - 02:04 » |
Quote
|
I have found another record type definition to be modified. The BASS_CHANNELINFO defined in bass.pas should be modified as follows.
BASS_CHANNELINFO = record freq: DWORD; // default playback rate chans: DWORD; // channels flags: DWORD; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags ctype: DWORD; // type of channel origres: DWORD; // original resolution plugin: HPLUGIN; // plugin sample: HSAMPLE; // sample {$IFDEF CPUX64} dummy: DWORD; // ** Should be added for 64bit mode {$ENDIF} filename: PChar; // filename end;
Some programmers may think that the original BASS_CHANNELINFO works well without any probelms. The problem is that it takes effect on the variable defined just after the variable of BASS_CHANNELINFO type.
ex) var BassChannelInfo : BASS_CHANNELINFO; PlayChannel : DWORD; . . begin PlayChannel := BASS_StreamCreateFile(FALSE, PChar(StreamName), 0, 0, 0); // The value of PlayChannel will be changed after executing following line. BASS_ChannelGetInfo(PlayChannel, BassChannelInfo); . .
(There may be a compiler directive I am not aware of, which avoid this kind of errors caused by mis-alignment)
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15259
|
 |
« Reply #115 on: 12 Mar '12 - 17:15 » |
Quote
|
Thanks. An updated BASS.PAS file is up in the BASS package now.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15259
|
 |
« Reply #116 on: 17 Apr '12 - 16:37 » |
Quote
|
The latest version of the BASSWV add-on is now up in the 1st post.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15259
|
 |
« Reply #117 on: 8 May '12 - 17:43 » |
Quote
|
The latest versions of BASS and the BASSmix add-on are now up in the 1st post.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15259
|
 |
« Reply #118 on: 4 Jul '12 - 17:32 » |
Quote
|
The latest version of the BASSMIDI add-on is now up in the 1st post. The BASS_AAC add-on has also been updated.
|
|
|
|
|
Logged
|
|
|
|
|
3delite
Posts: 623
|
 |
« Reply #119 on: 21 Jul '12 - 19:00 » |
Quote
|
May there be Win64 version of BASS_ADX, BASS_AIX, BASS_OFR and BASS_TTA add-ons?
Thanx!
|
|
|
|
|
Logged
|
|
|
|
|