20 May '13 - 14:06 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 ... 40 41 [42] 43 44 ... 60
  Reply  |  Print  
Author Topic: BASS.NET API 2.4.10.1  (Read 368191 times)
Dermot
Posts: 12


« Reply #820 on: 14 Sep '10 - 19:56 »
Reply with quoteQuote


Seems to be similar to this old bug in the framework that went unanswered

http://social.msdn.microsoft.com/forums/en-US/netfxcompact/thread/0cb91458-23b7-480c-8d0b-cdc24a824d20

Logged
radio42
Posts: 4012


« Reply #821 on: 14 Sep '10 - 23:39 »
Reply with quoteQuote

@Markus
take a look to the end of the Linux thread guess someone had the same problem
Logged
Markus
Guest
« Reply #822 on: 15 Sep '10 - 08:41 »
Reply with quoteQuote

@Ian: Now it looks good.

I removed the pulseaudio package:

sudo apt-get remove pulseaudio

.. and now it's working :-)
Logged
vasaka
Posts: 5


« Reply #823 on: 15 Sep '10 - 20:36 »
Reply with quoteQuote

Hi, I'm having a problem with opening WMA stream.

        static void Main(string[] args)
        {
            Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            var plg = Bass.BASS_PluginLoad("basswma.dll");
            var radioChannel = Bass.BASS_StreamCreateURL("http://78.46.54.158:1146", 0,
                               BASSFlag.BASS_DEFAULT, null, IntPtr.Zero);
            Bass.BASS_ChannelPlay(radioChannel, false);
            Console.ReadKey();
        }
It doesn't work. However, netradio from basswm24 plays it well, although it writes HTTP/1.0 400 BAD REQUEST.
Problem still doesn't solved. Can someone help me, please?
BASS_ErrorGetCode() returns BASS_ERROR_HANDLE.
Logged
Dermot
Posts: 12


« Reply #824 on: 16 Sep '10 - 00:43 »
Reply with quoteQuote


Just a follow up, i fixed the issue after i found it was the notify icon text field (tooltip) is limited to 64 characters in C#

I had the song name and artist showing on it, and thus was springing the exception.

So just changed it to a optional balloon and all working now, thanks.

Logged
radio42
Posts: 4012


« Reply #825 on: 16 Sep '10 - 12:24 »
Reply with quoteQuote

@vasaka:
yes, this is really strange!!!
I was able to reproduce it by even using the same code as in the netradio example.

Even more funny is, that the following will actually work:
Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, this.Handle);
Bass.BASS_PluginLoad("basswma.dll");
Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_NET_PLAYLIST, 1);
Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_NET_PREBUF, 0);

int chan = Bass.BASS_StreamCreateURL(@"http://78.46.54.158:1146", 0, BASSFlag.BASS_STREAM_BLOCK | BASSFlag.BASS_STREAM_AUTOFREE, null, IntPtr.Zero);
if (chan == 0)
    chan = BassWma.BASS_WMA_StreamCreateFile(@"http://78.46.54.158:1146", 0L, 0L, BASSFlag.BASS_STREAM_BLOCK | BASSFlag.BASS_STREAM_AUTOFREE);

if (chan != 0)
    Bass.BASS_ChannelPlay(chan, false);
Meaning in the above code sample the first "BASS_StreamCreateURL" will return 0 - but the second "BASS_WMA_StreamCreateFile" succeed!
Even thought the BASS_PluginLoad call was successfull!

Funny to see, that in the native basswma example a single "BASS_StreamCreateURL" seems to work - I would have no idea why?

The only difference I see between the native netradio sample, is that Bass.Net uses the UNICODE flag with BASS_StreamCreateURL.

And YES - this is it!
I just internally removed the UNICODE flag and see...now even the first "BASS_StreamCreateURL" succeeds!

So I guess this one is an issue for Ian...
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #826 on: 16 Sep '10 - 13:58 »
Reply with quoteQuote

BASSWMA does indeed need updating for the BASS_UNICODE flag support that was added to BASS_StreamCreateURL in BASS 2.4.6. Here is an update to try...

   www.un4seen.com/stuff/basswma.dll

Let me know if you still have any trouble with it.
Logged
radio42
Posts: 4012


« Reply #827 on: 16 Sep '10 - 14:19 »
Reply with quoteQuote

Yepp - that did the trick!
Logged
radio42
Posts: 4012


« Reply #828 on: 17 Sep '10 - 17:06 »
Reply with quoteQuote

17.09.2010: Version 2.4.6.8 is out!

BASSWMA: added support for v2.4.4.0
General:
  - WaveForm: ColorMiddleLeft, ColorMiddleRight properties added
  - WaveForm: PixelFormat property added

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

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

Logged
as
Guest
« Reply #829 on: 21 Sep '10 - 09:12 »
Reply with quoteQuote

i can not find bassasio.dll
Logged
Chris
Posts: 1504


« Reply #830 on: 21 Sep '10 - 10:15 »
Reply with quoteQuote

Here
http://www.un4seen.com/bassasio.html
Chris
Logged
vasaka
Posts: 5


« Reply #831 on: 22 Sep '10 - 20:28 »
Reply with quoteQuote

Thank you for helping me, I wasn't able to reply earlier.
Quote
This link is broken. Can you upload it again, please?
Logged
Markus
Guest
« Reply #832 on: 27 Sep '10 - 08:52 »
Reply with quoteQuote

Morning!

I have two players. Each player run in its own thread. (so it has its own stream)
When both players are running and I will exit my program, I can only stop (BASS_ChannelStop(stream)) and free (BASS_StreamFree(stream)) the first player.
When I try to stop the second player the applications hangs.

I init the devices in my main form (i have to do this because of the handle???).

Any ideas ?

Logged
radio42
Posts: 4012


« Reply #833 on: 27 Sep '10 - 09:06 »
Reply with quoteQuote

No, but it look like maybe there is something wrong in your code.
Are you using Bass.Net?
What prog language?
Can you post your code of the two players:
- how you create the threads
- how you create the players
- how you stop them
- etc.
Logged
Markus
Guest
« Reply #834 on: 27 Sep '10 - 09:38 »
Reply with quoteQuote

I'm using BASS.NET.
with C# (Win) + Mono (Ubuntu)


Creating Threads:

Thread th = new Thread(new ThreadStart(Run));     
th.Start();


Run() Method is a Statemachine:
while (!_finished)
{
  switch(threadState){
   
      case PlayerState.Loading:
          DoLoad();
          break;
      case PlayerState.Waiting: // do nothing;
          break;
      case PlayerState.Playing:
          DoPlay();
          break;
      case PlayerState.Stopped:
          DoStop(false);
          break;
      case PlayerState.FadeIn:
          DoFadeIn();
          break;
      case PlayerState.FadeOut:
          DoFadeOut();
          break;
      case PlayerState.Initialized:
          DoInit();
          break;
      case PlayerState.Paused:
          DoPause();
          break;
      case PlayerState.Finished:
          DoFinished();
          break;
      case PlayerState.PositionChanged:
          DoPositionChanged();
          break;
      case PlayerState.VolumeChanged:
          DoVolumeChanged();
          break;
      case PlayerState.Reload:
          DoReload();
          break;
      default: throw new Exception("player state + " + threadState + " unknown!");
          break;
  }
  Thread.Sleep(150);



Starting threads in my main form:

piPlayer1.Start();
piPlayer2.Start();

Stop threads:

if (_stream != 0)
{
  Bass.BASS_ChannelIsActive(_stream);
  Console.WriteLine("BASS_ChannelIsActive: " + Bass.BASS_ErrorGetCode());

  Bass.BASS_ChannelStop(_stream);
  Console.WriteLine("Bass.BASS_ChannelStop: " + Bass.BASS_ErrorGetCode());

  Bass.BASS_StreamFree(_stream);
  Console.WriteLine("Bass.BASS_StreamFree: " + Bass.BASS_ErrorGetCode());
}


Create Stream:

BASSFlag flag = BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_STREAM_AUTOFREE;

switch (_speaker)
{
    case 1: flag = flag | BASSFlag.BASS_SPEAKER_FRONT;
        break;
    case 2: flag = flag | BASSFlag.BASS_SPEAKER_REAR;
        break;
    case 3: flag = flag | BASSFlag.BASS_SPEAKER_CENLFE;
        break;
    case 4: flag = flag | BASSFlag.BASS_SPEAKER_REAR2;
        break;
    default:
        break;
}

Bass.BASS_ChannelIsActive(_stream);
Console.WriteLine("Bass.BASS_ChannelIsActive: " + Bass.BASS_ErrorGetCode());

Bass.BASS_SetDevice(_device);
Console.WriteLine("Bass.BASS_SetDevice: " + Bass.BASS_ErrorGetCode());

Bass.BASS_StreamFree(_stream);
Console.WriteLine("Bass.BASS_StreamFree: " + Bass.BASS_ErrorGetCode());

this._stream = Bass.BASS_StreamCreateFile(_tempFile, 0, 0, flag);
Console.WriteLine("Bass.BASS_StreamCreateFile: " + Bass.BASS_ErrorGetCode());

Logged
Markus
Guest
« Reply #835 on: 28 Sep '10 - 13:56 »
Reply with quoteQuote

what about the thread handling...

is there a thread for every stream/player ?
is there only one thread for the bass lib?
Logged
radio42
Posts: 4012


« Reply #836 on: 28 Sep '10 - 16:59 »
Reply with quoteQuote

Is "_stream" a local member in each thread class?

Regarding the BASS threads you should better post that in a non-Bass.Net post - as this is not related to Bass.Net, but handled by native BASS.
But as far as I know dowsn't BASS create a thread for each stream.

So I guess Ian might have to look at it, as this might be a Linux specific issue?!
Logged
Markus
Guest
« Reply #837 on: 28 Sep '10 - 17:09 »
Reply with quoteQuote

yes. _stream is a local member in each thread class.

i've tested some things....

when i create the stream in my main gui, the player doesn't jerk when i do something in the gui (loading lists from db or such things).
when i create the stream in my player class (in the main gui i have objects of this class with methods like create, play, ...) the player jerks.


so what is the best thing?

- create threads in the main gui for each "player" (stream) ?
OR
- no threads for players - only the bass.net methods ?

thx
Logged
Renegade
Posts: 148


« Reply #838 on: 7 Oct '10 - 08:13 »
Reply with quoteQuote

I'm having some issues that I just can't solve.

VERSIONS:
Bass: 2.4.6.0
Bass.Net: 2.4.6.8
BassFX: 2.4.6.0

From the Bass.Net sample projects:

In here (from SimpleFX.cs):
_StreamFX = BassFx.BASS_FX_TempoCreate(_Stream, BASSFlag.BASS_FX_FREESOURCE | BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_SAMPLE_LOOP);

_Stream is fine, but _StreamFX is 0.

In here (from Simple.cs):
_stream = Bass.BASS_StreamCreateFile(_fileName, 0, 0, BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_STREAM_PRESCAN);
if (_stream != 0 && Bass.BASS_ChannelPlay(_stream, false) )

_stream is 0.

The error code returned is:
BASS_ERROR_UNKNOWN

In my own project, I get the same problems.

I've just updated things, and am using all the latest DLLs.

I'm stumped. Nothing has really changed. The sample projects even have the same problem, so it's not just me.

I must be missing something. Is there some kind of environmental factor that I need to take in to account?

« Last Edit: 7 Oct '10 - 08:19 by Renegade » Logged
Renegade
Posts: 148


« Reply #839 on: 7 Oct '10 - 08:16 »
Reply with quoteQuote

I should mention that the SetFX project plays. (SetFX.cs)

So this here works:

// play the stream
if (_Stream != 0 && Bass.BASS_ChannelPlay(_Stream, false) )

Logged
Pages: 1 ... 40 41 [42] 43 44 ... 60
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines