Show Posts
|
|
Pages: [1]
|
|
1
|
Developments / BASS / Latency 3 seconds
|
on: 6 Feb '13 - 21:51
|
in my following code i try to realize videoconference with my friends. what i do is sendin an integer (how big is sound-chunk) - the sound chunk - an integer (how big is jpeg) - the jpeg. server sends same with one byte (ID of the user) to all the other connected users. http://pastebin.com/0tv8RR2Mpicture comes instantly but sound 2-3 seconds later. is it possible to decrease sound latency?
|
Reply
Quote
|
|
|
2
|
Developments / BASS / Re: BASS for Linux
|
on: 19 Aug '11 - 21:22
|
|
thanks a lot for fixing this! and a lot of thanks for making so great libraries, very useful! in the next step you can make it possible in bassenc server to send icy info.
|
Reply
Quote
|
|
|
3
|
Developments / BASS / Re: BASS for Linux
|
on: 18 Aug '11 - 21:50
|
chan1 = BASS_AAC_StreamCreateFile(FALSE,datei,0,0,BASS_STREAM_DECODE); chan3 = BASS_AAC_StreamCreateFile(FALSE,datei,0,0,BASS_STREAM_DECODE);
mixing = BASS_Mixer_StreamCreate (44101,2, BASS_STREAM_DECODE); BASS_Mixer_StreamAddChannel (mixing, chan1, 0);
mix2 = BASS_Mixer_StreamCreate (44100,2, BASS_STREAM_DECODE); BASS_Mixer_StreamAddChannel (mix2, chan3, 0);
enc = BASS_Encode_StartLimit(mixing,"aacplusenc - - 48",BASS_ENCODE_LIMIT,0,0,100000000); BASS_Encode_ServerInit (enc, radioport, 560000, 480000, 0, servfunc, NULL);
enc2 = BASS_Encode_StartLimit(mix2,"aacplusenc - - 48",BASS_ENCODE_LIMIT,0,0,100000000); BASS_Encode_ServerInit (enc2, "0.0.0.0:8050", 560000, 480000, 0, servfunc2, NULL);
enc with BASS_Mixer_StreamCreate (44101... you can listen to with http://djtraumwelt.de:8000enc2 with BASS_Mixer_StreamCreate (44100... you can listen to with http://djtraumwelt.de:8050should be online 24/7 port 8000 with a different sample frequenzy 44101 instead of 44100 he is resampling and sound is good port 8050 with same sample frequenzy he isnt resampling and sound is overdriven, much too loud and bad. i solved it with using 44101 as sample frequency but it would still be nice to solve it in the libbassmix.so
|
Reply
Quote
|
|
|
4
|
Developments / BASS / Re: how to kill a server
|
on: 18 Aug '11 - 05:24
|
|
This works perfektly, BASS_Encode_Stop is closing the server, starting it again is working fine =) thx a lot.
but another question: is it possible to send icy-info when an other song is played? like shoutcast or icecast do.
|
Reply
Quote
|
|
|
5
|
Developments / BASS / Re: BASS for Linux
|
on: 18 Aug '11 - 05:19
|
|
I have a problem with bassmix: sound is bad when source channel has the same sample frequency than the mixer channel. when i have different sample frequencys the sound is good. but only 44100 and 48000 works to play back with the win32 vlc, what the encoder on a linux machine is outputting. now i have files with 44100 and files with 48000 and i want all the files to get worked.
|
Reply
Quote
|
|
|
6
|
Developments / BASS / Re: how to kill a server
|
on: 30 Jul '11 - 10:51
|
|
or, is it possible, to make an encoder that is used by the server and a real encoder and then copy from the real encoder to the encoder that is used by the server, so when the real encoder dies, i can open a new encoder and then copy from the new encoder to the encoder that is used by the server?
|
Reply
Quote
|
|
|
8
|
Developments / BASS / need an example in c with streamcreatefileuser
|
on: 26 Jul '11 - 09:48
|
i want to write something like the shoutcast server that has a source port, where i can upload my moderation speeking in mp3. i tried to write a client source prog that sends the mp3 data like this: void CALLBACK EncodeProc( HENCODE handle, DWORD channel, const void *buffer, DWORD length, void *user) { send (sock, buffer, length, 0); } ... BASS_Init(-1,44100,0,0,NULL);
BASS_RecordInit(-1); hrec = BASS_RecordStart(44100,2,10<<16,0,0);
BASS_ChannelSetAttribute(hrec,BASS_ATTRIB_VOL,(float) 1.0); mixing=BASS_Mixer_StreamCreate(44100,2,BASS_MIXER_NONSTOP); BASS_Mixer_StreamAddChannel(mixing,hrec,0); BASS_ChannelPlay(mixing,0); ... enc = BASS_Encode_Start(mixing,"lame -q 0 -b 32 -",BASS_ENCODE_LIMIT,EncodeProc,0);
and my server prog on a linux vserver: void CALLBACK MyFileCloseProc(void *user) { return; }
QWORD CALLBACK MyFileLenProc(void *user) { return 100000000; // tried 0 then doesnt go forward }
DWORD CALLBACK MyFileReadProc(void *buffer, DWORD length, void *user) { recv (sock, buffer, length, 0); return length; // read from file }
BOOL CALLBACK MyFileSeekProc(QWORD offset, void *user) { return 0; // seek to offset } ... chan2 = BASS_StreamCreateFileUser(STREAMFILE_BUFFER, BASS_STREAM_DECODE, &fileprocs, 0); enc = BASS_Encode_Start(chan2,"aacplusenc - - 32",BASS_ENCODE_LIMIT,0,0); BASS_Encode_ServerInit (enc, "8000", 32000, 32000, 0, servfunc, NULL);
and now, i cant hear my voice. the client sends some data and after few seconds it stops sending data. playing the radiostream with vlc fails. the server isnt sending anything. playing and encoding mp3 files on the vserver works and vlc is playing the sound and receiving data. I need an example, how i can get the dj source working. thanks for reading this
|
Reply
Quote
|
|
|
10
|
Developments / BASS / Re: BASS for Linux
|
on: 9 Apr '11 - 15:23
|
|
i get error while loading shared libraries: /usr/lib/libbassenc.so: ELF file OS ABI invalid when starting a programm that uses libbassenc.so with the version of 18 mar 2011. maybe theres something wrong with this new version of libbassenc.so. can you upload an older version? i didnt save it.
|
Reply
Quote
|
|
|
11
|
Developments / BASS / getting BASS_ERROR_MEM when trying to equalize mp3
|
on: 5 Mar '11 - 20:25
|
equ1.lFilter = BASS_BFX_BQF_HIGHPASS; equ1.fCenter = (float) 4000.0; equ1.lChannel = BASS_BFX_CHANALL; equ1.fBandwidth = (float) 2.0; equ1.fGain = (float) -15.0; hfx1 = BASS_ChannelSetFX(chan1, BASS_FX_BFX_BQF, 1); printf ("%d\r\n", BASS_ErrorGetCode()); BASS_FXSetParameters(hfx1, &equ1); printf ("%d\r\n", BASS_ErrorGetCode()); getting 1 and 5 whats wrong edit: getting 19 and 5 edit 2: BASS_FX_GetVersion(); and it works
|
Reply
Quote
|
|
|
14
|
Developments / BASS / Re: Memory leak in C Prog with BASS2.4 for linux
|
on: 27 Jul '10 - 16:25
|
on my server is debian lenny5... and on my desktop at home too. on my server pmap shows nothing and on my desktop at home it show the info we need. thats very mysterious. alex@Alex-Debian:~$ pmap 8781 8781: autodj 08048000 4K r-x-- /home/alex/bin/autodj 08049000 4K rw--- /home/alex/bin/autodj 0804a000 240K rw--- [ anon ] b554d000 4K ----- [ anon ] b554e000 8192K rwx-- [ anon ] b5d4e000 4K ----- [ anon ] b5d4f000 8192K rwx-- [ anon ] b654f000 64K r-x-- /lib/i686/cmov/libresolv-2.7.so b655f000 8K rw--- /lib/i686/cmov/libresolv-2.7.so b6561000 8K rw--- [ anon ] b6563000 16K r-x-- /lib/i686/cmov/libnss_dns-2.7.so b6567000 8K rw--- /lib/i686/cmov/libnss_dns-2.7.so b6569000 8K r-x-- /lib/libnss_mdns4_minimal.so.2 b656b000 4K rw--- /lib/libnss_mdns4_minimal.so.2 b656c000 40K r-x-- /lib/i686/cmov/libnss_files-2.7.so b6576000 8K rw--- /lib/i686/cmov/libnss_files-2.7.so b6578000 4K ----- [ anon ] b6579000 8192K rwx-- [ anon ] b6d79000 4K ----- [ anon ] b6d7a000 8192K rwx-- [ anon ] b757a000 8K rw--- [ anon ] b757c000 144K r-x-- /lib/i686/cmov/libm-2.7.so b75a0000 8K rw--- /lib/i686/cmov/libm-2.7.so b75a2000 84K r-x-- /lib/i686/cmov/libpthread-2.7.so b75b7000 8K rw--- /lib/i686/cmov/libpthread-2.7.so b75b9000 8K rw--- [ anon ] b75bb000 8K r-x-- /lib/i686/cmov/libdl-2.7.so b75bd000 8K rw--- /lib/i686/cmov/libdl-2.7.so b75bf000 1364K r-x-- /lib/i686/cmov/libc-2.7.so b7714000 4K r---- /lib/i686/cmov/libc-2.7.so b7715000 8K rw--- /lib/i686/cmov/libc-2.7.so b7717000 12K rw--- [ anon ] b771a000 20K r-x-- /usr/lib/libbassenc.so b771f000 4K rw--- /usr/lib/libbassenc.so b7720000 4K rw--- [ anon ] b7721000 32K r-x-- /usr/lib/libbassmix.so b7729000 4K rw--- /usr/lib/libbassmix.so b772a000 128K rw--- [ anon ] b774a000 208K r-x-- /usr/lib/libbass.so b777e000 4K rw--- /usr/lib/libbass.so b777f000 216K rw--- [ anon ] b77c7000 8K rw--- [ anon ] b77c9000 4K r-x-- [ anon ] b77ca000 104K r-x-- /lib/ld-2.7.so b77e4000 8K rw--- /lib/ld-2.7.so bffd8000 148K rwx-- [ stack ] bfffd000 8K rw--- [ anon ] total 35760K
|
Reply
Quote
|
|
|
15
|
Developments / BASS / Re: Memory leak in C Prog with BASS2.4 for linux
|
on: 26 Jul '10 - 19:34
|
alex@vs0922:~$ pmap 3695 3695: /home/aac/autodj total 0K alex@vs0922:~$ this both times. i tryed pmap --help and then alex@vs0922:~$ pmap -x 3695 3695: /home/aac/autodj Address Kbytes RSS Anon Locked Mode Mapping -------- ------- ------- ------- ------- total kB 0 - - - alex@vs0922:~$ think, that this means, there are no files in cache, right? edit: when i remove the bassenc stuff, that helps nothing. the problem is anywhere else
|
Reply
Quote
|
|
|
16
|
Developments / BASS / Re: Memory leak in C Prog with BASS2.4 for linux
|
on: 26 Jul '10 - 15:38
|
|
thats to difficult for me. go slowly, please. linux caches the files. how can i see, if thats the problem and how can i free this cache?
it uses always more memory, when the next song is played. not faster and not slower. on my server there are 512 MB memory and on starting my autodj it uses 0.3% of this space and one day later it uses 4.5%.
thanks so far and greets from germany (thats the reason for bad english, if there is some)
edit: it is the process's memory usage, because i mean the usage of the output from 'ps xv|grep autodj' - there the system shows 0.3% and 0.7% an hour later...
|
Reply
Quote
|
|
|
17
|
Developments / BASS / Memory leak in C Prog with BASS2.4 for linux
|
on: 25 Jul '10 - 09:46
|
#include <dirent.h> #include <time.h> #include <stdlib.h> #include <stdio.h> #include "bass.h" #include "bassenc.h" #include "bassmix.h"
HSTREAM chan1,chan2,mix,chan; HENCODE enc1,enc2; char file[200]; int flip=0,a=0,i=0,ende; char buf[20000];
int main() { DIR *hdir; struct dirent *entry[500];
hdir=opendir("/path/to/mp3"); while(entry[i]=readdir(hdir)) i++; //closedir(hdir); ende=i;
srand(time(0));
BASS_Init(0,44100,0,0,0);
mix=BASS_Mixer_StreamCreate(44100,2,BASS_MIXER_NONSTOP|BASS_STREAM_DECODE);
while(1) { i=rand()%ende;
sprintf(file,"/path/to/mp3/%s",entry[i]->d_name);
if (flip==0) { chan1=BASS_StreamCreateFile(0,file,0,0,BASS_STREAM_DECODE); BASS_Mixer_StreamAddChannel(mix,chan1,BASS_STREAM_AUTOFREE); flip=1; chan=chan1; } else { chan2=BASS_StreamCreateFile(0,file,0,0,BASS_STREAM_DECODE); BASS_Mixer_StreamAddChannel(mix,chan2,BASS_STREAM_AUTOFREE); flip=0; chan=chan2; }
if (a==0) { a=1; enc1=BASS_Encode_Start(mix,"lame -b 128 - -",BASS_ENCODE_AUTOFREE,0,0); enc2=BASS_Encode_Start(mix,"aacplusenc - - 32",BASS_ENCODE_AUTOFREE,0,0); BASS_Encode_CastInit(enc1,"localhost:8000","sax",BASS_ENCODE_TYPE_MP3,"Traumwelt Radio","http://www.djtraumwelt.de","Elektro / Minimal",0,0,128,1); BASS_Encode_CastInit(enc2,"localhost:8010","copy",BASS_ENCODE_TYPE_AAC,"Traumwelt Radio","http://www.djtraumwelt.de","Elektro / Minimal",0,0,32,1); }
BASS_Encode_CastSetTitle(enc1,entry[i]->d_name,"http://www.djtraumwelt.de"); BASS_Encode_CastSetTitle(enc2,entry[i]->d_name,"http://www.djtraumwelt.de"); while (BASS_ChannelIsActive(chan) && BASS_Encode_IsActive(enc1) && BASS_Encode_IsActive(enc2)) { BASS_ChannelGetData(mix, buf, sizeof(buf)); // process some data }
BASS_Mixer_ChannelRemove(chan1); BASS_Mixer_ChannelRemove(chan2); BASS_StreamFree(chan1); BASS_StreamFree(chan2); if (!BASS_Encode_IsActive(enc1) || !BASS_Encode_IsActive(enc2)) { BASS_Encode_Stop(enc1); BASS_Encode_Stop(enc2); BASS_StreamFree(enc1); BASS_StreamFree(enc2); a=0; sleep(1); }
}
return 0; }
this is my autodj and always when the next track is playing, more memory it uses. more and more and more. anyone here, who knows the reason?
|
Reply
Quote
|
|
|
18
|
Developments / BASS / Re: need a linux how to
|
on: 28 Jun '10 - 19:10
|
|
a lot of thanks! it works now.
maybe a lot of djs could need this programm? i dont know anymore, where to get aacplusenc for linux, just ask google and with this program, the auto dj (shoutcast trancoder) can send in aac, helpful to get users, that have a slow internet connection.
greets from germany
|
Reply
Quote
|
|
|
19
|
Developments / BASS / need a linux how to
|
on: 27 Jun '10 - 09:25
|
#include <stdlib.h> #include <stdio.h> #include "c/bass.h" #include "bassenc/bassenc.h"
HSTREAM chan; HENCODE enc;
int main() { BASS_Init(0,44100,0,0,0); BASS_PluginLoad("libbassenc.so",0); chan=BASS_StreamCreateURL("http://127.0.0.1:8000",0,BASS_STREAM_DECODE,0,0); printf("%d",BASS_ErrorGetCode()); enc=BASS_Encode_Start(chan,"aacplusenc - - 32",0,0,0); printf("%d",BASS_ErrorGetCode()); BASS_Encode_CastInit(enc,"localhost:8010","copy",BASS_ENCODE_TYPE_AAC,"Traumwelt Radio","http://www.djtraumwelt.de","Elektro / Minimal",0,0,32,1); printf("%d",BASS_ErrorGetCode());
sleep(2); while(1) sleep(1);
return 0; }
this is what i have, but it doesnt work and im on my end of know how. this programm doesnt show any numbers, it shows nothing, aacplusenc is running, but server is down.
|
Reply
Quote
|
|
|
20
|
Developments / BASS / aacplus encoding
|
on: 11 May '10 - 12:48
|
|
I tried to write an audioplayer, that streams to a shoutcast server. encoding with lame works. encoding with enc_aacPlus doesn't. why?
when i encode with "enc_aacPlus.exe - - --br 32000 --he --silent --rawpcm 44100 2 16", the bass libs send 15% of the mplayers buffer and than stops sending data. it looks, that the encoder doesn't work correct. i even tried other aac encoders like faac or what ever i found in google. no aac encoder did work. what do i make wrong? can someone help me?
|
Reply
Quote
|
|
|