|
yps
Posts: 107
|
 |
« Reply #80 on: 25 Mar '09 - 08:05 » |
Quote
|
Oops, looks like I missed something as the thread grew longer  Cheers!
|
|
|
|
« Last Edit: 25 Mar '09 - 16:42 by yps »
|
Logged
|
|
|
|
|
xeche
Posts: 4
|
 |
« Reply #81 on: 26 Mar '09 - 23:11 » |
Quote
|
Hello,
I'm getting this: ALSA lib pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave whenever I try this: BASS_Init(1, 48000, BASS_DEVICE_DMIX, 0, 0);
I'm not very experienced with bass so I'm probably doing something wrong. Does anyone know what? As far as I can tell, the device is free as can be. ErrorGetCode says 37. Anyone?
|
|
|
|
|
Logged
|
|
|
|
|
saga
Posts: 1365
|
 |
« Reply #82 on: 26 Mar '09 - 23:33 » |
Quote
|
Does it work if you choose device -1 instead of 1? Or with 44100hz instead of 48000hz? Also try removing the flag ("DMIX"), it would be interesting to know which of the three could be errorneous (althoug the error message sounds like the flag could do something bad).
|
|
|
|
|
Logged
|
|
|
|
|
xeche
Posts: 4
|
 |
« Reply #83 on: 27 Mar '09 - 09:42 » |
Quote
|
Does it work if you choose device -1 instead of 1? Or with 44100hz instead of 48000hz? Also try removing the flag ("DMIX"), it would be interesting to know which of the three could be errorneous (althoug the error message sounds like the flag could do something bad).
Hi. I tried with 44100, with -1, with 2, and without the DMIX-flag. It gets past init with device = 0. Just be sure, is there anything at all I need to have done before I run BASS_Init()?
|
|
|
|
|
Logged
|
|
|
|
|
saga
Posts: 1365
|
 |
« Reply #84 on: 27 Mar '09 - 11:58 » |
Quote
|
I've never played around with different devices, but normally, BASS_Init() would be the first call indeed.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15258
|
 |
« Reply #85 on: 27 Mar '09 - 14:28 » |
Quote
|
That looks like the device is busy, eg. in use by something else. If you don't have anything else running, perhaps that is the system. Are you able to use ALSA output with any other audio software, eg. XMMS?
|
|
|
|
|
Logged
|
|
|
|
|
xeche
Posts: 4
|
 |
« Reply #86 on: 28 Mar '09 - 05:53 » |
Quote
|
That looks like the device is busy, eg. in use by something else. If you don't have anything else running, perhaps that is the system. Are you able to use ALSA output with any other audio software, eg. XMMS?
I tried a force-reload, and after that, BASS also worked as expected. I´ll go through my other audio application settings and double check that they in fact do use ALSA. I´m pretty sure they do, but just in case. If Renoise handles ALSA, it should be safe to assume that ALSA works correctly?
|
|
|
|
|
Logged
|
|
|
|
|
xeche
Posts: 4
|
 |
« Reply #87 on: 28 Mar '09 - 10:14 » |
Quote
|
It worked after a reboot, without the alsa force-restart, so I assume the problem was entirely on my end. (Probably some noob mistake somewhere). I'll post again with more info if the problem crops up again. Thanks for a great lib. 
|
|
|
|
|
Logged
|
|
|
|
|
alenofx
Posts: 28
|
 |
« Reply #88 on: 30 Mar '09 - 22:47 » |
Quote
|
Hi, I've a problem with the bass24-linux 18 Mar '09 release, x64 build. I've just made some quick tests, and playing an mp3 file (using the standard build, not the mp3-free) I get noise/distorted sound (like underwater music  ). No problem playing wav files (same results using basstest). Recompiled on the same machine under a 32bit environment all works fine. Note: I'm using an X-Fi Titanium sound card with the official 1.00 creative driver. I'm getting also the same error described by xeche when the BASS_DEVICE_DMIX flag is used ("ALSA lib pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave"), but a simple restart of the alsa daemon fixed that.
|
|
|
|
|
Logged
|
|
|
|
|
(: JOBnik! :)
Posts: 984
|
 |
« Reply #89 on: 31 Mar '09 - 07:58 » |
Quote
|
Hi  Please redownload the package and you will see there an updated version of x64 build  from 29.03.2009 Btw, there was an MP3 decoding problem in the x64 build, so an update of that is in the package now.
|
|
|
|
« Last Edit: 31 Mar '09 - 08:01 by (: JOBnik! :) »
|
Logged
|
|
|
|
|
alenofx
Posts: 28
|
 |
« Reply #90 on: 31 Mar '09 - 14:17 » |
Quote
|
Thank you JOBnik!  I'm sorry, I've missed that post. Works perfectly now. 
|
|
|
|
|
Logged
|
|
|
|
|
coyoteelabs
Posts: 4
|
 |
« Reply #91 on: 31 Mar '09 - 20:38 » |
Quote
|
I found a small bug in the pascal interface related to FreePascal/Lazarus. {$IFDEF WIN32} const // special STREAMPROCs STREAMPROC_DUMMY : STREAMPROC = STREAMPROC(0); // "dummy" stream STREAMPROC_PUSH : STREAMPROC = STREAMPROC(-1); // push stream {$ENDIF}
Apparently, FreePascal doesn't support this type of initialization of constants, so when compiling projects in windows, it gives compiler errors. Replacing STREAMPROC(0) and STREAMPROC(-1) with nil fixes the error but I haven't tested to see if it still works as intended. I'm also currently porting the Delphi Demos and dynamic bass interface to FreePascal and after I finish converting them (and testing), I will upload all of them here.
|
|
|
|
|
Logged
|
|
|
|
|
Chris
Posts: 1507
|
 |
« Reply #92 on: 1 Apr '09 - 10:09 » |
Quote
|
Hi I think this should be the right translation {$IFDEF WIN32} const // special STREAMPROCs STREAMPROC_DUMMY {: STREAMPROC} = Pointer(0); // "dummy" stream STREAMPROC_PUSH {: STREAMPROC} = Pointer(-1); // push stream {$ENDIF} Chris
|
|
|
|
|
Logged
|
|
|
|
|
fredvs
Posts: 327
|
 |
« Reply #93 on: 1 Apr '09 - 15:49 » |
Quote
|
Hi coyotelab currently porting dynamic bass interface to FreePascal and after I finish converting them (and testing), I will upload all of them here Good idea, dynamic bass for Lazarus will be very appreciated...
|
|
|
|
|
Logged
|
|
|
|
|
coyoteelabs
Posts: 4
|
 |
« Reply #94 on: 1 Apr '09 - 20:16 » |
Quote
|
I finished the port and tested the interface in windows and linux You can get the interface here: http://mythweb.ro/pascal/bass/lazdynamic_bass.zipI also ported the BassTest demo to Lazarus and tested in both windows and linux. The demo can use either the static bass.pas or the dynamic interface (lazdynamic_bass.pas) by enabling or disabling the compiler define at the top or utest.pas ( {$DEFINE USE_DYNAMIC_BASS} ) Download BassTest for Lazarus: http://mythweb.ro/pascal/bass/LazBassTest.zip
|
|
|
|
|
Logged
|
|
|
|
|
fredvs
Posts: 327
|
 |
« Reply #95 on: 1 Apr '09 - 21:11 » |
Quote
|
Hi coyoteelab. Super, it seems to work your lazdynamic_bass.pas but... I get a error in linux with : BASS_GetCPU it is no more a float result it expect single BASS_ErrorGetCode expected qword. Otherwise, it compile perfectly. Super Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
coyoteelabs
Posts: 4
|
 |
« Reply #96 on: 1 Apr '09 - 21:27 » |
Quote
|
I get a error in linux with : BASS_GetCPU it is no more a float result it expect single BASS_ErrorGetCode expected qword. Otherwise, it compile perfectly. Super Thanks.
I tested it in Linux (Ubuntu 8.10). The demo compiled without any problems, and BASS_GetCPU worked as it was supposed to. It might have something to do with your version of Lazarus. Also, my nick is coyoteelab s, not coyoteelab
|
|
|
|
|
Logged
|
|
|
|
|
Chris
Posts: 1507
|
 |
« Reply #97 on: 2 Apr '09 - 09:43 » |
Quote
|
Hi {$IFDEF WIN32} const // special STREAMPROCs STREAMPROC_DUMMY : STREAMPROC = nil; // "dummy" stream STREAMPROC_PUSH : STREAMPROC = nil; // push stream {$ENDIF} Thats not correct that must be {$IFDEF WIN32} const // special STREAMPROCs STREAMPROC_DUMMY {: STREAMPROC} = Pointer(0); // "dummy" stream STREAMPROC_PUSH {: STREAMPROC} = Pointer(-1); // push stream {$ENDIF} Chris
|
|
|
|
|
Logged
|
|
|
|
|
fredvs
Posts: 327
|
 |
« Reply #98 on: 3 Apr '09 - 14:21 » |
Quote
|
Hello coyoteelabs (excuse me for the mistake  ) I find my solution. If i use Bass.pas : procedure cpuget_bass_pas; var cpu : float ; begin cpu := BASS_GetCPU ; end; If i use lazdynamic_bass.pas: procedure cpuget_lazdynamic_bass; var cpu : float ; begin cpu := BASS_GetCPU(); end; (I need to insert ()) Thanks very much for your translation coyoteelabs. My opinion : Lazarus is very powerful and the couple Bass-Lazarus have a great future.
|
|
|
|
|
Logged
|
|
|
|
|
coyoteelabs
Posts: 4
|
 |
« Reply #99 on: 3 Apr '09 - 20:56 » |
Quote
|
(I need to insert ())
Thanks very much for your translation coyoteelabs.
My opinion : Lazarus is very powerful and the couple Bass-Lazarus have a great future.
If you would have looked at the demo you would have seen that I added the brackets to all BASS functions. It also shows that you didn't read the lazarus documentation for delphi users where it says that brackets are mandatory, even if the functions take no parameters.
|
|
|
|
|
Logged
|
|
|
|
|