|
fredvs
Posts: 327
|
 |
« Reply #100 on: 6 Apr '09 - 15:41 » |
Quote
|
It also shows that you didn't read the lazarus documentation.
Yep, Coyoteelabs, excuse me, im not a lazarus-guru like you 
|
|
|
|
|
Logged
|
|
|
|
|
fredvs
Posts: 327
|
 |
« Reply #101 on: 8 Apr '09 - 18:24 » |
Quote
|
Hello Bass lovers. I'm happy to announce you that MiXimum, the DJ's best friend, for Linux and Windows, is available. You can download it free at http://members.lycos.co.uk/mixk/Your comments are welcome. PS MiXimum is developed with Lazarus.
|
|
|
|
« Last Edit: 8 Apr '09 - 19:36 by fredvs »
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15253
|
 |
« Reply #102 on: 10 Apr '09 - 15:09 » |
Quote
|
The "mp3-free" version had a problem (no data/sound) with libmpg123 1.7, so an update to correct that is now in the package.
|
|
|
|
|
Logged
|
|
|
|
|
saga
Posts: 1364
|
 |
« Reply #103 on: 21 Apr '09 - 20:16 » |
Quote
|
EDIT: Ok, Solved... EDIT: Or maybe not. I don't know if this could be a BASS-related problem or not, but I have a program here that seems to segfault. It crashes on Linux but it doesn't on Windows. It crashes when calling BASS_ChannelSetPosition(handle, MakeLong(1, 0), BASS_POS_MUSIC_ORDER)
|
|
|
|
« Last Edit: 21 Apr '09 - 20:46 by saga »
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15253
|
 |
« Reply #104 on: 22 Apr '09 - 16:25 » |
Quote
|
I tried to reproduce the problem, but it didn't happen. Does it affect a particular file, or all files? If I recall correctly, you're not using the C/C++ API, so perhaps there is a problem in the translation; what does the BASS_ChannelSetPosition declaration look like? Note that the "pos" parameter should be 64-bit.
|
|
|
|
|
Logged
|
|
|
|
|
Chris
Posts: 1505
|
 |
« Reply #105 on: 22 Apr '09 - 18:08 » |
Quote
|
BASS_ChannelSetPosition(handle, MakeLong(1, 0), BASS_POS_MUSIC_ORDER)
By the way as Ian said the Result of MakeLong is a DWORD and not a QWord So if you ar working with Lazarus/Free Pascal It have to be something like this function makeqword(d1, d2: dword): qword; begin result:=(qword(d2) shl 32) or d1; end;
BASS_ChannelSetPosition(handle, makeqword(1, 0), BASS_POS_MUSIC_ORDER)
Chris
|
|
|
|
|
Logged
|
|
|
|
|
saga
Posts: 1364
|
 |
« Reply #106 on: 22 Apr '09 - 20:30 » |
Quote
|
The headers should be correct (translated from the C headers). And no, i don't use pascal and yes I convert the MAKELONG parameter (because the freebasic compiler actually bitches about that implicit typecast). I tried to reproduce it in other places of the program but it only seems to happen at some particular points, so I guess I'll really have to dig deeper into my own sourcecode to find out what's wrong...
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15253
|
 |
« Reply #107 on: 23 Apr '09 - 15:50 » |
Quote
|
BASS_ChannelSetPosition(handle, MakeLong(1, 0), BASS_POS_MUSIC_ORDER)
By the way as Ian said the Result of MakeLong is a DWORD and not a QWord Although the BASS_ChannelSetPosition parameter is a QWORD, the BASS_POS_MUSIC_ORDER mode still only uses the low 32 bits, so MAKELONG is the correct macro to use  It shouldn't usually be necessary to do so, but if a compiler is being fussy, you could type-cast it... BASS_ChannelSetPosition(handle, (QWORD)MAKELONG(1, 0), BASS_POS_MUSIC_ORDER);
The headers should be correct (translated from the C headers). And no, i don't use pascal and yes I convert the MAKELONG parameter (because the freebasic compiler actually bitches about that implicit typecast). I tried to reproduce it in other places of the program but it only seems to happen at some particular points, so I guess I'll really have to dig deeper into my own sourcecode to find out what's wrong...
Does Freebasic have a debugger? If so, what does the call-stack and registers (and dissassembly if available) look like at the point of crash?
|
|
|
|
|
Logged
|
|
|
|
|
saga
Posts: 1364
|
 |
« Reply #108 on: 23 Apr '09 - 16:06 » |
Quote
|
Hmmm... I'm using the "Insight" debugger on Windows, but it doesn't display any changes when this particular command is called. I'll have to find a debugger for linux then... EDIT: gdb seems to be a good option. i'll try that now. When crashing, those lines appear: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb183eb90 (LWP 5808)] 0xb7e6acc6 in ?? () from ./libbass.so
(gdb) backtrace #0 0xb7f2acc6 in ?? () from ./libbass.so Cannot access memory at address 0x5
(gdb) info frame Stack level 0, frame at 0x9: eip = 0xb7f2acc6; saved eip Cannot access memory at address 0x5
(gdb) info registers eax 0x89b7af8 144407288 ecx 0x0 0 edx 0x1b 27 ebx 0x1b 27 esp 0xb18fa210 0xb18fa210 ebp 0x1 0x1 esi 0x1b 27 edi 0x0 0 eip 0xb7f2acc6 0xb7f2acc6 eflags 0x10282 [ SF IF RF ] cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51
I'm not sure how to do disassembly, because the "disas" command only shows "No function contains program counter for selected frame.".
|
|
|
|
« Last Edit: 23 Apr '09 - 16:29 by saga »
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15253
|
 |
« Reply #109 on: 24 Apr '09 - 17:50 » |
Quote
|
OK, I think I'll have to send you a debug version to some further info on the problem.
|
|
|
|
|
Logged
|
|
|
|
|
saga
Posts: 1364
|
 |
« Reply #110 on: 24 Apr '09 - 18:04 » |
Quote
|
that would be appreciated. 
|
|
|
|
|
Logged
|
|
|
|
|
bega
Posts: 19
|
 |
« Reply #111 on: 23 May '09 - 19:29 » |
Quote
|
Is possible mp3 Rec Example using Lame for Linux?
Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15253
|
 |
« Reply #112 on: 25 May '09 - 16:14 » |
Quote
|
Please see BASSenc's RECTEST example, included in the Linux BASS package in the 1st post.
|
|
|
|
|
Logged
|
|
|
|
|
yps
Posts: 107
|
 |
« Reply #113 on: 5 Jun '09 - 16:21 » |
Quote
|
I'm getting a SIGFPE every once in a while when starting a new file in my radio automation software: Program received signal SIGFPE, Arithmetic exception. [Switching to Thread 0xb7266720 (LWP 7413)] 0xb78ed776 in ?? () from ./libbass.so
Perhaps it's the same sort of error as the one I recently reported for OS X? See http://www.un4seen.com/forum/?topic=9910.0 Torben
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15253
|
 |
« Reply #114 on: 5 Jun '09 - 17:16 » |
Quote
|
Yep, it could well be the same thing, as that piece of code is the same in the OSX and Linux versions. An updated build is now in the Linux package (in the 1st post). Let me know if you still have the problem with it.
|
|
|
|
|
Logged
|
|
|
|
|
ken
Posts: 630
|
 |
« Reply #115 on: 6 Jun '09 - 12:17 » |
Quote
|
I try to use BASS with "Mono" I use C# and Bass.NET. I think Bass.NET works in Mono, I can call simple functions as "Un4seen.Bass.BassNet.ShowAbout(this);" But when Init BASS or tying to use "BASS_RecordGetDeviceInfos" the app craches. I have in app.config: <configuration> <dllmap dll="bass.dll" target="libbass.so" /> </configuration>
"libbass.so" is in the same folder as my exe and Bass.NET dll. Using Mono 2.4 /openSUSE Any suggestion how to do, I'm new to programing for Linux.
|
|
|
|
|
Logged
|
|
|
|
|
ken
Posts: 630
|
 |
« Reply #116 on: 6 Jun '09 - 13:32 » |
Quote
|
Ok got BASS_Init to work (forgot to copy libbass.so to /usr/lib) But when creating a stream I get error "BASS_ERROR_FILEFORM" , I can't play anything MP3, or WAV or OGG. I installed "Fluendo MP3" codec. Any special trix for Linux..? Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero
_stream = Bass.BASS_StreamCreateFile(_file, 0, 0, BASSFlag.BASS_SAMPLE_FLOAT); //Tested with BASS_DEFAULT if (_stream != 0) { Bass.BASS_ChannelPlay(_stream, false); } else { lboxStatus.Items.Add("Error Playing: " + Bass.BASS_ErrorGetCode().ToString()); }
|
|
|
|
« Last Edit: 6 Jun '09 - 13:56 by ken »
|
Logged
|
|
|
|
|
ken
Posts: 630
|
 |
« Reply #117 on: 6 Jun '09 - 15:58 » |
Quote
|
So I did some more testing, I can play all my audio if I use "BASS_StreamCreateFileUser". That works, but a hard way to play a file. Why can't I simply use BASS_StreamCreateFile.
Ian: will BASSenc, BASSmix & BASSwma come in Linux versions?
/Ken
|
|
|
|
|
Logged
|
|
|
|
|
yps
Posts: 107
|
 |
« Reply #118 on: 8 Jun '09 - 12:06 » |
Quote
|
Ian: Seems to be ok, no errors so far. Cheers!
ken: BASSenc and BASSmix are included in the main download from the first post of this thread (unlike the Windows version where they come as separate packages).
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15253
|
 |
« Reply #119 on: 8 Jun '09 - 16:32 » |
Quote
|
So I did some more testing, I can play all my audio if I use "BASS_StreamCreateFileUser". That works, but a hard way to play a file. Why can't I simply use BASS_StreamCreateFile.
I think that'll be because .Net (and I guess Mono too) uses Unicode (UTF-16) strings by default, and so BASS.Net uses the BASS_UNICODE flag when calling BASS_StreamCreateFile. The Linux (and OSX) version of BASS doesn't support the BASS_UNICODE flag as the filenames are UTF-8 anyway by default. But here's an update to try, with experimental support for the BASS_UNICODE flag... www.un4seen.com/stuff/libbass.soRegarding BASSWMA, I'm not sure the WMA codec is freely/legally available for use on Linux?
|
|
|
|
|
Logged
|
|
|
|
|