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

Ian @ un4seen

  • Administrator
  • Posts: 25446
Re: BASS.NET API 2.4.12.1
« Reply #1400 on: 29 Aug '16 - 16:10 »
It looks like you want the sound to follow default device changes? If so, you can simply enable the BASS_CONFIG_DEV_DEFAULT option to have that happen automatically (on Win7 and above), like this:

Code: [Select]
Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_DEV_DEFAULT, 1); // enable "Default" device

That should be done before you call BASS_Init, eg. in your app's initialization.

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1401 on: 9 Sep '16 - 11:25 »
09.09.2016: Version 2.4.12.3 is out!

Note:
   - Support for BASSenc_OGG added
   - Support for BASSenc_OPUS added

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

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


IMPORTANT NOTE:
With this release I do NOT provide any setup.exe tool anymore!
This means, the full install is a plain zip file (just like for the native bass lib).
Just extract it to any new folder of your choice.

fstarred

  • Posts: 106
Re: BASS.NET API 2.4.12.3
« Reply #1402 on: 17 Sep '16 - 11:08 »
I've updated bass.net with latest version (2.4.12.3) as well as the bass.dll (2.4.12), but now the BASS_INIT throws an error "Impossible to load module bass".

The same code works with an old version combo of Bass.NET / bass I already had.

This is the code:

Code: [Select]

string libpath = @"D:\lib\x64";

bool load = Bass.LoadMe(libpath);

Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);


radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1403 on: 17 Sep '16 - 17:14 »
Sounds strange, as nothing was changed. And a simple test here (using a similar code) worked just fine.

fstarred

  • Posts: 106
Re: BASS.NET API 2.4.12.3
« Reply #1404 on: 23 Sep '16 - 21:27 »
I don't want to bother you, but are you sure you provided another directory and you removed bass.dll from exe path?

Because my sensation is that Bass.loadMe ignore the provided path and still look for the default path instead  :)

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1405 on: 23 Sep '16 - 21:47 »
No, I am using Path.Combine to concatenagte the given path with the lib-name.
What value does LoadMe return True or False?

fstarred

  • Posts: 106
Re: BASS.NET API 2.4.12.3
« Reply #1406 on: 24 Sep '16 - 13:10 »
Wait wait, do you include lib name? Because I always used to give only the directory which contained the libs

EDIT
LoadMe return false.
Hovever, I had a previous version of BASS that used to work nonetheless returned false as well.

PS
My OS is Win10
« Last Edit: 24 Sep '16 - 13:53 by zenon »

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1407 on: 25 Sep '16 - 08:14 »
I add (combine) the lib-name within the function, so you only need to pass the path.
But I doubt, that it was working before even if it also returned false - in that case I assume there must have been changed something else outside Bass.Net...

Dickal

  • Posts: 7
Re: BASS.NET API 2.4.12.3
« Reply #1408 on: 17 Oct '16 - 16:41 »
Hello.
Please tell me, how can I cut mp3 file? For example I have mp3 file with 10seconds silence in begin. I want to cut this 10 seconds and save file.

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1409 on: 18 Oct '16 - 07:42 »
There is no direct MP3 (frame) editing function in BASS available.
What you can do is to re-encode the file (i.e. create a stream, set to position to 10 sec., and then set an encoder using the BASSenc add-on on it to re-encode the file).
That way you however will loose some quality.


toob

  • Posts: 137
Re: BASS.NET API 2.4.12.3
« Reply #1410 on: 2 Nov '16 - 18:41 »
Can you please help me figure out why I get {"Invalid device: BASS_OK"} on the line marked with ** below?

 
Code: [Select]
Imports Un4seen.Bass.Misc
Imports Un4seen.Bass
Imports System.IO
Imports Un4seen.BassWasapi
...

Dim _wasapi As BassWasapiHandler
Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATEPERIOD, 0)
Bass.BASS_Init(0, 48000, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero)
_wasapi = New BassWasapiHandler(0, False, 48000, 2, 1.0F, 1.0F)     **
_wasapi.Init()
_stream = _wasapi.InputChannel
If _wasapi.DeviceMute Then
       _wasapi.DeviceMute = False
 End If
 _wasapi.Start()
« Last Edit: 2 Nov '16 - 18:46 by toob »

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1411 on: 2 Nov '16 - 19:32 »
Good question.
The exception is thrown after a call to "BASS_WASAPI_GetDeviceInfo" with the device 0 in your case.
The only idea I currently have is, that the device info somehow returns invalid data, e.g. an invalid device name, which causes this error.
E.g. the call to "BASS_WASAPI_GetDeviceInfo" was successful, but the returned data could not be marshaled back.

toob

  • Posts: 137
Re: BASS.NET API 2.4.12.3
« Reply #1412 on: 2 Nov '16 - 19:40 »
Thanks, where could I look or check for an invalid device nam? BTW I have tried 0 thru to 15,.all return the same error.

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1413 on: 2 Nov '16 - 19:54 »
That's strange.
What does the Windows control panel show?

toob

  • Posts: 137
Re: BASS.NET API 2.4.12.3
« Reply #1414 on: 2 Nov '16 - 20:14 »
Playback
Speakers and Headphones (IDT High Definition Audio CODEC) (default)
Communications Headphones (IDT High Definition Audio CODEC)

Recording
External Mic (IDT High Definition Audio CODEC) (unavailable)
Internal Mic (disabled)
Stereo Mix (IDT High Definition Audio CODEC) (default)
Microphone (disabled)

Windows 10
64 bit

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1415 on: 3 Nov '16 - 07:55 »
Please try to manually call "BASS_WASAPI_GetDeviceInfo" within your code to see what that reveals.

toob

  • Posts: 137
Re: BASS.NET API 2.4.12.3
« Reply #1416 on: 3 Nov '16 - 09:31 »
Code: [Select]
While (BassWasapi.BASS_WASAPI_GetDeviceInfo(n, info))
            mess = mess & info.ToString()
            n += 1
        End While

Code never enters the while loop. I've attached the values in info, hopefully this may help?

Please see screen shot.
« Last Edit: 3 Nov '16 - 09:37 by toob »

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1417 on: 3 Nov '16 - 09:43 »
What OS are you using? Is Wasapi indeed be available on your machine?
It looks, like BASS_WASAPI_GetDeviceInfo is directly failing - I guess Ian must sheed some light here...

toob

  • Posts: 137
Re: BASS.NET API 2.4.12.3
« Reply #1418 on: 3 Nov '16 - 09:49 »
Windows 10 64bit

bass.dll
Bass.Net.dll
bassmix.dll

libraries are in project and all code compiles successfully.
I can play mp3 files using bass fine no problems.

Imports are:
Imports Un4seen.Bass.Misc
Imports Un4seen.Bass
Imports System.IO
Imports Un4seen.BassWasapi

Am I missing a library perhaps?

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1419 on: 3 Nov '16 - 10:30 »
What about the basswasapi.dll ? Is that missing?!

toob

  • Posts: 137
Re: BASS.NET API 2.4.12.3
« Reply #1420 on: 3 Nov '16 - 11:05 »
basswasapi.dll was not in the project as I thought it was part of bass.Net?
What made me think this is that VB imports included "Un4seen.BassWasapi" and it compiled without errors without basswasapi.dll.

Anyway, Ive added basswasapi.dll  cleaned and rebuilt, however it has not made a difference to the original error:
Invalid device: BASS_OK
on this line
_wasapi = New BassWasapiHandler(0, False, 48000, 2, 1.0F, 1.0F)

and BassWasapi.BASS_WASAPI_GetDeviceInfo(n, info) still returns the exact same info and never enters the while loop.

toob

  • Posts: 137
Re: BASS.NET API 2.4.12.3
« Reply #1421 on: 3 Nov '16 - 11:18 »
Perhaps I'm barking up the wrong tree. The purpose of this part of the app is to detect beats in real-time from speaker output(Windows stereo mix).
For this I was intending to use _bpm.ProcessAudio on a stream
To get the stream I was intending to use BassWasapi
Ultimately the beats will be used to trigger DMX lighting.
Am I going down the right route or is there something better suited in Bass?

radio42

  • Posts: 4827
Re: BASS.NET API 2.4.12.3
« Reply #1422 on: 3 Nov '16 - 11:33 »
Try to call "BassWasapi.BASS_WASAPI_GetVersion()"
maybe the dll is in the wrong location...?


toob

  • Posts: 137
Re: BASS.NET API 2.4.12.3
« Reply #1423 on: 3 Nov '16 - 11:36 »
System.BadImageFormatException was unhandled
  Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
  Source=Bass.Net
  StackTrace:
       at Un4seen.BassWasapi.BassWasapi.BASS_WASAPI_GetVersion()
     

toob

  • Posts: 137
Re: BASS.NET API 2.4.12.3
« Reply #1424 on: 3 Nov '16 - 11:44 »
Success , thanks

« Last Edit: 3 Nov '16 - 13:34 by toob »