Author Topic: BASS.NET API 2.4.12.7  (Read 783475 times)

Zarkow

  • Guest
Re: BASS.NET API 2.4.6.8
« Reply #875 on: 20 Nov '10 - 19:25 »
Downloaded the latest version (2.4.6.8.Net) and bass 2.4.4, run the examples (after copying bass.dll and bass.net.dll to the output dir) and sofar everything is working fine, very nice work.

One question, might be silly but since this is new for me... the note in the source-code (ex NetRadio.cs) mentions that I should copy basswma.dll to the output dir also, but I lack this file...do I need to download this file or is it some legacy comments in the code?

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.6.8
« Reply #876 on: 20 Nov '10 - 19:41 »
There are may addons available for BASS, one is basswma.dll - all can be downloaded from the un4seen page - see the menu on the left of this page.

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.7.0
« Reply #877 on: 30 Nov '10 - 20:36 »
30.11.2010: Version 2.4.7.0 is out!

BASS: added support for v2.4.7.0
Upgrade all addon/plugins to support the latest versions!

Full Install:
  www.un4seen.com/filez/4/Bass24.Net.zip

Lib only:
  www.un4seen.com/filez/4/Bass24.Net_update.zip


hwahrmann

  • Posts: 137
Re: BASS.NET API 2.4.7.0
« Reply #878 on: 1 Dec '10 - 20:42 »
What happened to the EncoderWinampAACplus.AACPlus_Mp4Box field?

is this no longer needed?

Edit: ah, seems no longer needed, because of libmp4v2.dll. Correct?

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.7.0
« Reply #879 on: 2 Dec '10 - 07:00 »
Correct!
The MP4 output property is now called "AACPlus_UseMp4Output".
However, this flag is automatically applied when encoding to an output file with the extension '.m4a' or '.mp4'.

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.7.0
« Reply #880 on: 20 Dec '10 - 13:24 »
20.12.2010: Version 2.4.7.1 is out!

BASSmix: added support for v2.4.5.0
General: ID3v2 picture tag reading bug-fix

Full Install:
 www.un4seen.com/filez/4/Bass24.Net.zip

Lib only:
 www.un4seen.com/filez/4/Bass24.Net_update.zip

Windows CE version:
  www.un4seen.com/filez/4/Bass24.Net_compact.zip

iPhone version:
  www.un4seen.com/filez/4/Bass24.Net_iphone.zip


ken

  • Posts: 739
Re: BASS.NET API 2.4.7.1
« Reply #881 on: 26 Dec '10 - 16:14 »
Happy X-Mas!

How do I get "datastream" from a channel used in BassMixer?

This is how I get get data from BASS_RecordStart (in my "receiver" I use BASS_StreamPutData) and it works fine, but I need to "feed" my receiver with a channel from BassMixer.

Code: [Select]
myRecordProc = new RECORDPROC(MyRecording);
stream = Bass.BASS_RecordStart(48000, 2, BASSFlag.BASS_RECORD_PAUSE, 50, myRecordProc, IntPtr.Zero);

byte[] myBuffer = null;
private bool MyRecording(int handle, IntPtr buffer, int length, IntPtr user)
{
      if(SendBuffer != null)
      {
          if(myBuffer == null || myBuffer.Length < length)
             myBuffer = new byte[length];
             Marshal.Copy(buffer, myBuffer, 0, length);
             SendBufferTCP(myBuffer, length);
        }
        return true;
}

/Ken


radio42

  • Posts: 4576
Re: BASS.NET API 2.4.7.1
« Reply #882 on: 27 Dec '10 - 09:35 »
You might use a DSPPROC to get the data from a mixer channel

hwahrmann

  • Posts: 137
Re: BASS.NET API 2.4.7.1
« Reply #883 on: 28 Dec '10 - 09:08 »
Hi Bernd,

latest Winamp 5.601 does no longer contain nscrt.dll.
I've copied the latest enc_aacplus.dll, downloaded your latest enc_aacplus.exe and copied libmp4v2.dll from winamp.
Encoding hangs. and used from command line, it crashes.

Could this be the missing nscrt.dll?

thx,

Helmut

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.7.1
« Reply #884 on: 28 Dec '10 - 13:14 »
I need to check that.
Normally the 2 dlls you mentioned should work.

ken

  • Posts: 739
Re: BASS.NET API 2.4.7.1
« Reply #885 on: 11 Jan '11 - 09:27 »
Hi Bernd!

Some times my app crash for "no reason", now I finally saw it in debug, just after program launch.

AddChannel on BassMix gave me error:
Quote
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.


My code:
Code: [Select]
Bass.BASS_StreamFree(_channel1);
_channel1 = Bass.BASS_StreamCreateFile(songcard.Filename, 0L, 0L, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT);

BassMix.BASS_Mixer_StreamAddChannel(_Mixer1, _channel1, BASSFlag.BASS_MIXER_PAUSE | BASSFlag.BASS_STREAM_AUTOFREE);  //HANGED ON THIS ROW!!

I use BassWasapi and run latest version of all Bass DLL's

Any ideas?

/Ken

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.7.1
« Reply #886 on: 11 Jan '11 - 09:53 »
As far as I recall there was a bug in BASS/BASSmix causing such error - but that was actually fixed with the last releases.
So are you sure you are really using the lastest version?

ken

  • Posts: 739
Re: BASS.NET API 2.4.7.1
« Reply #887 on: 12 Jan '11 - 08:31 »
As far as I recall there was a bug in BASS/BASSmix causing such error - but that was actually fixed with the last releases.
So are you sure you are really using the lastest version?

I'm 99% sure I had the latest dll's. But just to be safe I now downloaded all again. So lets hope the problem was solved.

airleacheri

  • Posts: 2
Re: BASS.NET API 2.4.7.1
« Reply #888 on: 12 Jan '11 - 12:03 »
Exist BPM recognition is assembly unbreakable to put into act and I imagine it's more central to have good thump sync between stream  Also auto "pitch" on slaves so that they pursue the BPM on the master flow and keep on in sync would be grand.

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.7.1
« Reply #889 on: 12 Jan '11 - 13:56 »
@airleacheri:
I am not sure I understand you?!
Can you explain a little bit more what you are trying to say...

ken

  • Posts: 739
Re: BASS.NET API 2.4.7.1
« Reply #890 on: 16 Jan '11 - 11:55 »
I'm 99% sure I had the latest dll's. But just to be safe I now downloaded all again. So lets hope the problem was solved.

No, some bug is stil there. Strangly this after a few seconds playback. But no all every time..?

Exception:
Code: [Select]
System.AccessViolationException was unhandled
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=Bass.Net
  StackTrace:
       vid Un4seen.Bass.Bass.BASS_ChannelGetData(Int32 handle, IntPtr buffer, Int32 length)
       vid Un4seen.BassWasapi.BassWasapiHandler.WasapiOutputCallback(IntPtr buffer, Int32 length, IntPtr user)

MAYR2006

  • Posts: 10
Re: BASS.NET API 2.4.7.1
« Reply #891 on: 24 Jan '11 - 21:55 »
Hi, this is possible o stream to icecast the line out (speakers)?

Thank's

What is the Bass init if is possible...

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.7.1
« Reply #892 on: 25 Jan '11 - 07:48 »
Yes, but you must 'record' your 'line out' - i.e. using the 'What you hear' or 'Stereo Mix' device (if that's available for you, e.g. under Win7 this might not be there depending on your soundcard and/or sound control panel settings).
You can then use BASS_RecordInit to init such recording device and use the returned recording channel for 'streaming'.

Graham

  • Posts: 5
Re: BASS.NET API 2.4.7.1
« Reply #893 on: 2 Feb '11 - 23:27 »
Quote

No, some bug is stil there. Strangly this after a few seconds playback. But no all every time..?

Exception:
Code: [Select]
System.AccessViolationException was unhandled
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=Bass.Net
  StackTrace:
       vid Un4seen.Bass.Bass.BASS_ChannelGetData(Int32 handle, IntPtr buffer, Int32 length)
       vid Un4seen.BassWasapi.BassWasapiHandler.WasapiOutputCallback(IntPtr buffer, Int32 length, IntPtr user)


Ken/Bernd,

I am seeing a similar issue, unfortunately it is very random in nature. Using Visual C# 2010 Express and the latest versions of bass, bassasio, bassmix and bass.net. Running on Window 7. Hope this helps if there is indeed a problem.

Graham

Code: [Select]
Parameter name: source</Message><StackTrace>   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
   at Un4seen.Bass.Misc.DSP_BufferStream.DSPCallback(Int32 handle, Int32 channel, IntPtr buffer, Int32 length, IntPtr user)
   at Un4seen.Bass.Bass.BASS_ChannelGetData(Int32 handle, IntPtr buffer, Int32 length)
   at Un4seen.BassAsio.BassAsioHandler.AsioOutputCallback(Boolean input, Int32 channel, IntPtr buffer, Int32 length, IntPtr user)</StackTrace><ExceptionString>System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
   at Un4seen.Bass.Misc.DSP_BufferStream.DSPCallback(Int32 handle, Int32 channel, IntPtr buffer, Int32 length, IntPtr user)
   at Un4seen.Bass.Bass.BASS_ChannelGetData(Int32 handle, IntPtr buffer, Int32 length)
   at Un4seen.BassAsio.BassAsioHandler.AsioOutputCallback(Boolean input, Int32 channel, IntPtr buffer, Int32 length, IntPtr user)</ExceptionString></Exception></TraceRecord>

Problem Event Name: CLR20r3
  Problem Signature 01: tscs2011.exe
  Problem Signature 02: 1.0.0.0
  Problem Signature 03: 4cee3ff3
  Problem Signature 04: Bass.Net
  Problem Signature 05: 2.4.6.8
  Problem Signature 06: 4c938faa
  Problem Signature 07: 5ed
  Problem Signature 08: 23
  Problem Signature 09: System.ArgumentNullException
  OS Version: 6.1.7600.2.0.0.768.3
  Locale ID: 2057
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

georgich

  • Posts: 3
Re: BASS.NET API 2.4.7.1
« Reply #894 on: 6 Feb '11 - 11:45 »
Hi everybody!

StreamCreateURL is a wonderful method. But i have some trouble with it. I have to download file which can be downloaded only after sending Http headers such as User Agent, Accept, Accept-Encoding and Accept-Language. The link format is, for example: http://fz.domain.com/handlers/audio.ashx?1fhk-fhjs-uqwir-gjks
But this is mp3 file. I think that StreamCreateURL can play it but the problem is in Http headers.

Please, help. Thanks.

ken

  • Posts: 739
Re: BASS.NET API 2.4.7.1
« Reply #895 on: 6 Feb '11 - 13:22 »
Hi Bernd,

I'm playing with BASS_DSHOW, and try to render a WaveForm from a video, but i will not work. So the question is, can it be done?

Some code:
Code: [Select]
//Init

if (Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero))
{
      Bass.BASS_PluginLoad("BASS_DSHOW.dll");
      BassDShow.BASS_DSHOW_Init(IntPtr.Zero);

      BassDShow.BASS_DSHOW_SetConfig(BASSDSHOWVideoRenderer.BASS_DSHOW_USEDefault);
      BassDShow.BASS_DSHOW_SetConfig(BASSDSHOWConfig.BASS_DSHOW_VideoRenderer, 0);
}


//Do WF
WF2 = new WaveForm(filename, new WAVEFORMPROC(MyWaveFormCallback), null);
WF2.FrameResolution = 0.01f;
...

What happens is that the video pops up in a new window, playing with no sound. No WaveForm is renderd (WF render if I use an mp3)

Also tried to get BPM frm bassfx, like this:
Code: [Select]

videostream = BassDShow.BASS_DSHOW_StreamCreateFile(_file, BASSFlag.BASS_STREAM_DECODE);
BassDShow.BASS_DSHOW_ChannelSetWindow(videostream, _videoPic.Handle);
           
double _c1=0;
double _c2=0;
Un4seen.Bass.Utils.DetectCuePoints(videostream, 0.1F, ref _c1, ref _c2, -45, -92, 2);

Console.WriteLine("CUE: " + _c1 + " -- " + _c2);

_bpmProc = new BPMPROCESSPROC(MyBPMProc);

float bpm = BassFx.BASS_FX_BPM_DecodeGet(videostream, 0.0, 120.0, 0, BASSFXBpm.BASS_FX_BPM_BKGRND |
                           BASSFXBpm.BASS_FX_FREESOURCE |
                           BASSFXBpm.BASS_FX_BPM_MULT2, _bpmProc);

Console.WriteLine("BPM ERROR: " + Bass.BASS_ErrorGetCode()); //retuns OK

Console.WriteLine("BPM: " + bpm);


Video plays just fine (no sound as I use STREAM_DECODE), BPM return 0, but DetectCuePoints give me positions...

What i'm realy need is: Reder WaveForm, Get BPM and calculate Cue points. I actually don't need playback of video (I use other component for that in WPF).

/Ken
 

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.7.1
« Reply #896 on: 7 Feb '11 - 13:37 »
Being honest I don't know what STREAM the DSHOW actually returns.
So I am not sure - if it is a 'real' addon like the other format addons - as such I am not sure where the limitations are lying with DSHOW!

The WaveForm class 'simply' either takes a given DECODING stream handle and calls BASS_ChannelGetData on it to get the sample data or if a filename is given such a DECODING stream is created via BASS_StreamCreateFile internally.
If DSHOW needs something more (or doesn't support BASS_StreamCreateFile) I am affraid it won't work.

But you might try the 1st overload and create the decoding stream yourself and give that to the WaveForm?

ken

  • Posts: 739
Re: BASS.NET API 2.4.7.1
« Reply #897 on: 7 Feb '11 - 17:41 »
I kind of work now...

If I load DSHOW with BASS_PluginLoad, then I can use BASS_StreamCreateFile to play the video. And I get a "some" waveform using WF2.RenderStart(videostream, true); No overload used on WaveForm().

But I don't get the hole waveform. I think DShow maybe have problem with flag BASS_STREAM_DECODE, since the video play in normal speed but no audio, so it's properly not real decode that's why BassFX don't give me BPM.  DShow also give lots of "Attempted to read or write protected memory." when free channels.

Is there any other way to get bass read the audio in a videofile (for now only .mp4 videos), I only need BASS for calculate cue's, bpm and draw a WaveForm no actually playback of the video. (maybe load ffdshow codec..?)

/Ken


ken

  • Posts: 739
Re: BASS.NET API 2.4.7.1
« Reply #898 on: 7 Feb '11 - 17:49 »
OK...  .mp4 video was easy. just load the "bass_acc" (to easy...) but If I want to use mpg/vob tha don't work. But for mp4 video I just got what I need ;-)

eversmile

  • Posts: 1
Re: BASS.NET API 2.4.7.1
« Reply #899 on: 13 Feb '11 - 20:08 »
Hi, I have some problems with bass.net api using Visual Studio 10. When I try to run samples I have badImageformatexception HRESULT: 0x8007000B. I have added reference , lib files are the executable directory. Everything should work fine. I have also Visual Studio 2005 installed, may this be a problem?

The exception occurs on line Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero. I downloaded the library before and worked on VS 2005 without .net api it was working fine. On VS 10 I can not run anything. Please help.