Author Topic: BASS.NET API 2.4.17.5  (Read 1128185 times)

ken

  • Posts: 752
Re: BASS .NET API 2.3.0.6 !
« Reply #100 on: 6 Nov '06 - 16:00 »
I get error when using "BaseEncoder.EncodeFile", I asume I need the new 'bassenc.dll' or? (I have now 2.3.0.1 of basenc)

Unable to find an entry point named 'BASS_Encode_GetChannel' in DLL 'bassenc.dll'.

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.6 !
« Reply #101 on: 6 Nov '06 - 16:20 »
Yepp - you'll find it here: www.un4seen.com/stuff/bassenc.zip


ken

  • Posts: 752
Re: BASS .NET API 2.3.0.6 !
« Reply #102 on: 6 Nov '06 - 18:17 »
Hmm, U sure?

The version is the same, size off dll is bigger.

But... I'ts not encodeing as it should.

This works... (live recording)
Code: [Select]
lameTooLame = new EncoderTooLAME(_recHandle);
lameTooLame.InputFile = null;
lameTooLame.OutputFile = filename + ".MP2";
lameTooLame.TOO_Bitrate = bitRate;
lameTooLame.Start(null, 0);

This don't... (offline convert)

Code: [Select]
EncoderTooLAME _tooLame = new EncoderTooLAME(0);
_tooLame.TOO_Bitrate = bitRate;
BaseEncoder.EncodeFile(inpFile, outputFile + ".MP2", _tooLame, new BaseEncoder.ENCODEFILEPROC(FileEncodingNotification), true, false);
                   

I tested MP3 also same result. My code worked in your previous (2.3.0.5) dll

ken

  • Posts: 752
Re: BASS .NET API 2.3.0.6 !
« Reply #103 on: 6 Nov '06 - 18:42 »
A "encoder request"

A nice overload to "BaseEncoder.EncodeFile" would be "startPos" and "endPos" so that I can encode/convert just a part of my original file.

Or is there a simple way to do this, with the encoder class?

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.6 !
« Reply #104 on: 6 Nov '06 - 20:29 »
No, that wouldn't be possible at the moment...but should be easy to achive anyhow:

Code: [Select]
// "Stream (Decoding)" To "File":
int _stream = Bass.BASS_StreamCreateFile( "test.wav", 0, 0, BASSStream.BASS_STREAM_DECODE);

EncoderLAME l = new EncoderLAME(_stream);
l.InputFile = null; //STDIN
l.OutputFile = "test.mp3";
l.LAME_Bitrate = (int)EncoderLAME.BITRATE.kbps_64;
l.LAME_Mode = EncoderLAME.LAMEMode.Default;
l.LAME_Quality = EncoderLAME.LAMEQuality.Quality;

// set the pos of the stream
long fromPos = 123;   // in bytes
float toPos    = 99999;  // in byte
Bass.BASS_ChannelSetPosition(_stream, fromPos);

// encode the data
l.Start(null, 0);
byte[] encBuffer = new byte[65536]; // our dummy encoder buffer (32KB x 16-bit - size it as you like)
while ( fromPos < toPos && Bass.BASS_ChannelIsActive(_stream) == (int)BASSActive.BASS_ACTIVE_PLAYING )
{
    if (toPos - fromPos < encBuffer.Length)
        fromPos += Bass.BASS_ChannelGetData(_stream, ref encBuffer[0], toPos - fromPos);
    else
        fromPos += Bass.BASS_ChannelGetData(_stream, ref encBuffer[0], encBuffer.Length);
}

// finish
l.Stop();

But I might add those overloads to the next version ;-)
« Last Edit: 6 Nov '06 - 20:34 by radio42 »

ken

  • Posts: 752
Re: BASS .NET API 2.3.0.6 !
« Reply #105 on: 6 Nov '06 - 21:18 »
Thx.

Do you know why my encoding don't work in with the latest bassenc ?

See my previous post: https://www.un4seen.com/forum/?topic=4932.msg42646#msg42646

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.6 !
« Reply #106 on: 6 Nov '06 - 22:41 »
Hi Ken,

I am really sorry, but there was a little bug in it :-)

Here is an update to try:
.Net 1.1. build : http://www.un4seen.com/filez/4/Bass23.Net11_update.zip
.Net 2.0 build : http://www.un4seen.com/filez/4/Bass23.Net20_update.zip

Therefore the requested overloads had already been added ;-)
See BaseEncoder.EncodeFile...

Let me know, if that worked out!

ken

  • Posts: 752
Re: BASS .NET API 2.3.0.6 !
« Reply #107 on: 7 Nov '06 - 14:23 »
Hi!

Looks like "offline" and "live" encoding works as it should now. Only thing was that now I must have "Bass.BASS_ChannelPlay" to start my recording, before I think the encoder class did that, cause I did't hade "Bass.BASS_ChannelPlay" in my code...

Thanks!

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.6 !
« Reply #108 on: 7 Nov '06 - 15:03 »
Regarding the recording:
That depends on how you started recording.

If you used the _PAUSED flag in your code you must call BASS_ChannelPlay to actually start recording.
But if you didn't use that flag...it will start encoding right away.

I didn't change anything there, so pls post your code, so that I can see what you exactly mean.
THX

ken

  • Posts: 752
Re: BASS .NET API 2.3.0.6 !
« Reply #109 on: 7 Nov '06 - 15:07 »
Hi!

I use DEFAULT flag. here is the code: https://www.un4seen.com/forum/?topic=4932.msg42485#msg42485

Now I use PAUSE flag  and  Bass.BASS_ChannelPlay, it works so I keep it that way

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.6 !
« Reply #110 on: 7 Nov '06 - 20:05 »
Hi Ken,

that could not be possible - I just made a new test and all worked without BASS_ChannelPlay.
i also did not use the _PAUSE flag !

So please make sure you did the following:

a) redown load the Bass.Net update !
.Net 1.1. build : http://www.un4seen.com/filez/4/Bass23.Net11_update.zip
.Net 2.0 build : http://www.un4seen.com/filez/4/Bass23.Net20_update.zip

-> then make sure you:
1. Close your Visual Studio
2. copy the Bass.Net.dll and Bass.Net.xml to your installation directory
   e.g. C:\Program Files\BASS\Bass\.NET11  or C:\Program Files\BASS\Bass\.NET20
3. Now start your Visual Studio again and all should be fine!
    (the updated version of Bass.net should already have version 2.3.0.7)

b) Make sure you are using TwoLAME v0.3.8b !
    In my tests I discovered something similar when still using an old version of TwoLAME.
    But with 0.3.8b it starts encoding right away here!

Many Greetz

ken

  • Posts: 752
Re: BASS .NET API 2.3.0.6 !
« Reply #111 on: 8 Nov '06 - 11:38 »
Hi!

Now it works...

I downloaded the update again, and now it work with "DEFAULT" flag. Thx. Btw, it was on all encoders not only "twolame".

Is there any differens on using "DEFAULT" flag and the encoder starts "recording" or using "PAUSE" and I self start by "Bass.BASS_ChannelPlay" ?

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.6 !
« Reply #112 on: 8 Nov '06 - 16:33 »
Perfect!
Nop - you can also use PAUSE and the call BASS_ChannelPlay yourself.
The Encoder's don't do anything with the flags.

I just wanted to keep it almost the same, no matter if you are a recording are a file channel handle.

ken

  • Posts: 752
Re: BASS .NET API 2.3.0.6 !
« Reply #113 on: 10 Nov '06 - 13:47 »
Hi!

More strange stuff...

I try to list my playback devices. But "Bass.BASS_GetDeviceDescriptions" only returns "No Sound"

Before I did like this and it works just fine:

Code: [Select]
comboBox1.Items.AddRange(Bass.BASS_GetDeviceDescriptions());

But if I do like this I get my devices listed.
Code: [Select]
for (int i = 0; i < Bass.BASS_GetDeviceCount(); i++)
{
    comboBox1.Items.Add(Bass.BASS_GetDeviceDescription(i));
}

But my last audiodevice is not listed, in Windows Control panel I have 5 audiodev's (playback). With BAss I only get 4 + "NoSound" at top of the list.



Strange is that this function for recording devices works just fine. "Bass.BASS_RecordGetDeviceDescriptions"

Code: [Select]
comboBox2.Items.AddRange(Bass.BASS_RecordGetDeviceDescriptions());

« Last Edit: 10 Nov '06 - 13:58 by ken »

tr1

  • Posts: 12
Re: BASS .NET API 2.3.0.6 !
« Reply #114 on: 11 Nov '06 - 13:39 »
I downloaded the samples...got them all to load and compile, except the one I'm most interested in, CS Streaming  :-\

"The project could not be loaded. The 'Reference' start tag on line 75 does not match the end tag of 'ItemGroup'. Line 92, position 5.

Any help would be greatly appreciated.

ken

  • Posts: 752
Re: BASS .NET API 2.3.0.6 !
« Reply #115 on: 11 Nov '06 - 15:30 »
tr1!

Try the Streaming2 example, and make sure you have the needed bass DLLs and encoders in you "bin" folder:

Se note from streaming class:

Code: [Select]
// NOTE: Needs 'bass.dll' - copy it to your output directory first!
//       needs 'bassenc.dll' - copy it to your output directory first!
//       needs 'basswma.dll' - copy it to your output directory first!

// NOTE: At least one of the following command-line encoders are needed as well:
//       Copy the following files to your output directory first!
//       lame.exe        : from http://www.rarewares.org/mp3.html
//       oggenc2.exe     : from http://www.rarewares.org/ogg.html
//       enc_aacPlus.exe : from http://www.un4seen.com/filez/4/enc_aacPlus.zip
//                         also needs 'enc_aacPlus.dll' and 'nscrt.dll'
//                         which can be obtained from your Winamp/plugin directory

tr1

  • Posts: 12
Re: BASS .NET API 2.3.0.6 !
« Reply #116 on: 11 Nov '06 - 19:15 »
Ken,

   I did as you suggested...moved the dll's to the bin folder...still didn't load.

Uninstalled Bass.NET 2.0 and reinstalled.  All examples C# (AsioRecording, CreateFileUser, TestDSP, etc.) work, EXCEPT Streaming.

I didn't see a Streaming2 example...could you point me in the right direction?

tr1

tr1

  • Posts: 12
Re: BASS .NET API 2.3.0.6 !
« Reply #117 on: 12 Nov '06 - 01:44 »
Copied source into another clean project and got it to work...



radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.6 !
« Reply #118 on: 12 Nov '06 - 17:24 »
@Ken,
regarding "BASS_GetDeviceDescriptions" and "BASS_GetDeviceCount":
You are right - I unluckily added a liitle bug during the 64-bit compatibility port in 2.3.0.6.
I'll fix that with the next update!

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.7 !
« Reply #119 on: 12 Nov '06 - 21:49 »
12.11.2006: Version 2.3.0.7 is out!!!

General:
- new BassNet.ShowSplash and BassNet.ShowAbout methods added
  -> for those who still want to support BASS.NET even in the FREEWARE version.

BASSmidi 2.3.0.0 final support added

Misc: all BaseEncoder now have a TAGs property to specify tag info updates
- all encoders now support tag writing (if applicable)
- new overloads added for BaseEncoder.EncodeFile
- new EncoderFAAC, EncoderFLAC, EncoderWavPack, EncoderMPC added
- byte order bug-fix in EncoderTwoLAME
- bug fix in SendData of SHOUTcast and ICEcast (LessDataSend)
  -> LessDataSend was incorrectly reported due to wrong allocated memory size.
  -> So now LessDataSend should actually never happen
  -> If it will happen anyhow, the server will now be disconnected automatically

BASS: Bug fix in BASS_GetDeviceDescriptions and BASS_GetDeviceCount
-> this bug was added in the 2.3.0.6 version due to the 64-bit compatibility build and now reports the correct number of devices.

Samples: The project file of the "Streaming" sample was also fixed.

P.S.:
For all users who have already registered BASS.NET: There is NO need to register again! Your registration key is still valid and can be used also with the 2.3.0.7 version.
« Last Edit: 12 Nov '06 - 22:27 by radio42 »

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.7 !
« Reply #120 on: 13 Nov '06 - 16:11 »
@Ken:
Did the new version 2.3.0.7 sort out your issues with "BASS_GetDeviceDescriptions" and "BASS_GetDeviceCount"?

@TommyB:
Did the new version 2.3.0.7 sort out your "LessDataSend" issue?

@Tr1:
Guess the "Streaming" example should now work fine with the 2.3.0.7 version?!

tr1

  • Posts: 12
Re: BASS .NET API 2.3.0.7 !
« Reply #121 on: 13 Nov '06 - 18:36 »
Yes!!  Thank you.


tr1

  • Posts: 12
Re: BASS .NET API 2.3.0.7 !
« Reply #122 on: 14 Nov '06 - 13:04 »
@Ken:
Did the new version 2.3.0.7 sort out your issues with "BASS_GetDeviceDescriptions" and "BASS_GetDeviceCount"?

@TommyB:
Did the new version 2.3.0.7 sort out your "LessDataSend" issue?

@Tr1:
Guess the "Streaming" example should now work fine with the 2.3.0.7 version?!

Actually, I spoke too soon.

When I unpacked the 2.3.0.7 version, the NetRadio example and Streaming example looked the same...is it me?  The previous version had the tabs for IceCast, StreamCast, etc.

So I reverted to the old example that I had and am now getting a 'BASS_encode_init' error, when I check on the use BASS check box.

Is the example with the tabs for IceCast, SteamCast obsolete?


radio42

  • Posts: 4839
Re: BASS .NET API 2.3.0.7 !
« Reply #123 on: 14 Nov '06 - 14:24 »
I guess it must be you.

I just double checked it and the samples provided with the BASS.NET v2.3.0.7. actually all work fine.
And of course the "NetRadio" example and "Streaming" example are completely different.
And are of course also not obsolete....the tabs SHOUTcast, ICEcast and WMAcast are still there ;-)
And also the UseBASS checkbox works as desired.

The reason why you could face this issue might be, that you might have modified the samples yourself in the meantime. And so the standard windows installer might not correctly overwrite your already modified samples.

So I suggest you:
a) uninstall BASS.NET again from your machine
b) go to the samples directories (e.g. C:\Program Files\BASS\.NET11\Samples) and remove all files!
c) install BASS.NET 2.3.0.7 again

Bow all the sample files should work fine again...

tr1

  • Posts: 12
Re: BASS .NET API 2.3.0.7 !
« Reply #124 on: 14 Nov '06 - 15:50 »
radio42...yes it was me (and my pals at Microsoft.) 

Programming can be a very humbling experience... :-[


I am still confronted with the 'BASS_Encode_CastInit in DLL 'bassenc.dll'.  I am using version 2.3.0.1 of bassenc.dll.in my bin directory.