Author Topic: SHOUTcast Real Example !!!  (Read 807 times)

bll1401

  • Posts: 19
SHOUTcast Real Example !!!
« on: 8 Sep '17 - 23:54 »
Hi ,

This my 1st thread here :-

I was trying to find a real example in VB.Net which allows me to do :

1- Capture the sound signal from my PC sound card ( input )
2-Stream that to SHOUTcast !!!

please help with a link to download the example  :(

Thanks


bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #1 on: 10 Sep '17 - 00:13 »

No one till now did it before !!

If anyone can help I can pay him for the effort


Thanks


radio42

  • Posts: 4576
Re: SHOUTcast Real Example !!!
« Reply #2 on: 11 Sep '17 - 07:13 »
See here: http://www.bass.radio42.com/help/html/b8533cef-2485-af79-61aa-1b4a637099b9.htm

Bass.Net contains a Broadcast helper class, which allows you to do what you want.
The docs even contain some sample code.

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #3 on: 11 Sep '17 - 10:51 »
I tried that before  and got an error :


radio42

  • Posts: 4576
Re: SHOUTcast Real Example !!!
« Reply #4 on: 11 Sep '17 - 11:09 »
Then see here: http://www.bass.radio42.com/help/html/b8b8a713-7af4-465e-a612-1acd769d4639.htm#32vs64

You probably mixed 32-bit and 64-bit; e.g. you app is compiled as AnyCPU running on a 64-OS, but you provided the 32-bit native dlls - or the other way around...

radio42

  • Posts: 4576
Re: SHOUTcast Real Example !!!
« Reply #5 on: 11 Sep '17 - 13:28 »
Else take a look to the "Sample/CS/Streaming" folder which comes with Bass.Net - this is a C# streaming sample application.
Guess this is easy to convert to VB.Net.

Plus there is a "Samples\VB\StreamTest" folder...

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #6 on: 11 Sep '17 - 15:22 »

Thanks ,

tried to run the CS example ( after I copy all required DLLs into the bin folder and referenced the Bass.Net.DLL to the project )

but it shows this error

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: SHOUTcast Real Example !!!
« Reply #7 on: 11 Sep '17 - 17:00 »
What is your project's "Platform Target" setting? That should match the BASS DLLs that you use, eg. if you use the 32-bit DLLs, then set it to "x86".

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #8 on: 12 Sep '17 - 22:13 »
Tried that   nothing worked still see same error !!!

anyone can access my PC via Team Viewer  and correct the project   


Please help!

radio42

  • Posts: 4576
Re: SHOUTcast Real Example !!!
« Reply #9 on: 13 Sep '17 - 07:50 »
Before getting tired and wanting personal support - why don't you try to answer the questions?

Have you read the readme.txt for the samples:
In order to run the samples the bass library and add-ons are needed.
These native bass libraries are nor included and need to be downloaded @ www.un4seen.com
The bass dlls needs to be copied to the startup directory first, e.g. .\bin\Debug

Here is a list of required bass libraries for the different samples:
Streaming C#:
-----------------
bass.dll
bassenc.dll
basswma.dll
needs command-line encoders (e.g. download from www.rarewares.org)


1) Have you provided the needed native bass libraries?
(i.e. as shown above)

2) What Target-Platform have you defined in your project?
(i.e. x86 or x64)

3) Have you used the 'correct' related native bass libraries?
(i.e. if x86 -> then use the 32bit native bass lib; if x64 -> then use the 64bit native bass lib)

4) What exact error do you get?
5) at what exact code line?
6) post your source code here

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #10 on: 13 Sep '17 - 09:43 »
Yes I did read the read me

Yes I did attach the native library 32bit to the bin folder

Yes I tried to target my project to be 32 bit ( also 64 tried )


see the common error I see here

radio42

  • Posts: 4576
Re: SHOUTcast Real Example !!!
« Reply #11 on: 13 Sep '17 - 10:09 »
What is your Target Platform of the project set to?
And what Bass.Net libs have you used (the one from the Deploy/v4.5 folder)? Or any other?

Where exactly have you placed you native bass library binaries?
I assume currently in the bin/Debug folder?
Please also make sure, that you have not placed any other bass.dll somewhere else, e.g. check your Windows and System folder!

I do not even see any BASS_Init or any BASS_RecordInit call in your code - are these missing?

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #12 on: 13 Sep '17 - 13:21 »
I used v 4.0  which downloaded from here un4seen

I have followed the read me file in order  to copy the DLLs to the bin folder

I also made the reference of the Bass.Net.DLL to my project ( the exact example of C# streaming ) 

Nothing to do now !!! 


I do not even see any BASS_Init or any BASS_RecordInit call in your code - are these missing?


Actually I am testing the same example !!!   so if it's missing some lines of code   that will not be from me :(


Can you send me a 100% WORKING example includes these :

1- Capture from sound card ( input )
2- Stream that capture to SHOUTcast
3-Record in MP3 using lame ( command line )
4-Show VU for input

Thanks

bellal

radio42

  • Posts: 4576
Re: SHOUTcast Real Example !!!
« Reply #13 on: 13 Sep '17 - 19:06 »
As said: You have a 100% working example - see the C# Streaming sample!

I don't know where you have the above code from - but note, that the help-doc only contains sample snippets, but not ready-made examples.
I am a C# developer, not a VB one, but again: I assume, you can easily convert the provided C# sample to VB.Net!
If not, someone else might help out here...
« Last Edit: 13 Sep '17 - 19:42 by radio42 »

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #14 on: 13 Sep '17 - 22:10 »
I was trying 32 bit and last time used 32 bit for everything   didn't work gives error

I just tried 64 bit   worked nice now   ;D ;D ;D ;D ;D ;D

but on my stream player I see  BASS.NET title   if I sued my licence ( email + activation ) can I replace it with my own title ?

Thanks

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #15 on: 13 Sep '17 - 23:10 »
Got it  to rename just song title

I am trying now to record the input  ( same input of streaming )

any fast help ?

THANKS :)

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #16 on: 14 Sep '17 - 01:18 »
I am facing issues after I converted the code to VB.Net

_broadCast >> doesn't have Notification methode ?   all other methods are listed like ( Connect,AutoConnect ... etc ) but there isn't Notification


also

  _recProc = New RECORDPROC(RecordingHandler)    has err even though I convert it's function from C# to VB 

see the attachments images :)

radio42

  • Posts: 4576
Re: SHOUTcast Real Example !!!
« Reply #17 on: 14 Sep '17 - 07:40 »
I am glad you finally got it working.
For the other questions: I am not a VB coder, so someone else might help here...

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #18 on: 15 Sep '17 - 14:22 »
I didn't see the example of recording the streaming

is it included in the examples ( just tried ASIO or something ) didn't record to file


is there a a function can be called to record what I stream directly to file  using the same encoding of the streaming ?


Thanks


radio42

  • Posts: 4576
Re: SHOUTcast Real Example !!!
« Reply #19 on: 15 Sep '17 - 15:01 »
See here: http://www.bass.radio42.com/help/html/53d3394f-6acf-c797-c21e-700ce5204826.htm
(and scroll down to the example "Recording" to "File")

And before you ask again: NO, THIS is ONYL a CODE SNIPPET, NOT a FULLY working sample application.
Guess it is time to learn this yourself now... ;-)

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #20 on: 16 Sep '17 - 01:28 »
I tried that

no error :)

but didn't record !!    even didn't create the mp3 file to the same path   

I am not expert in this    please be patient & help  :-[


Thanks


radio42

  • Posts: 4576
Re: SHOUTcast Real Example !!!
« Reply #21 on: 16 Sep '17 - 17:06 »
I guess you have read the related docs for the related commands?!
Have you provided the "lame.exe" into your bin directory?

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #22 on: 17 Sep '17 - 00:18 »

everything seems ok for me   but nothing recorded !!!

lame.exe and its DLL is in the same bin folder as I did on streaming before


actually its the same app  streaming & recording at the same time

please guide me




Chris

  • Posts: 1810
Re: SHOUTcast Real Example !!!
« Reply #23 on: 17 Sep '17 - 20:33 »
im also not a vb coder but that should to be

Code: [Select]
Private _myRecProc As RECORDPROC

_myRecProc = New RECORDPROC(AddressOf MyRecording)

Private Function MyRecording(handle As Integer, buffer As IntPtr, length As Integer, user As IntPtr) As Boolean

chris

bll1401

  • Posts: 19
Re: SHOUTcast Real Example !!!
« Reply #24 on: 18 Sep '17 - 20:03 »
No I need it in C#   I tried to convert it  but couldn't be


Please if you have an example ready as project in C#   I would appreciate it    Thanks