20 Jun '13 - 02:21 *
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]
  Reply  |  Print  
Author Topic: How to use bass.net.dll on C# 2005 express  (Read 2990 times)
lab82
Guest
« on: 12 Oct '07 - 12:29 »
Reply with quoteQuote

Hello, I wonder if you can kindly give an example in C# with the usual buttons

"Play, stop, pause"

You tutorial or linkage examples?

   
I use Visual C# 2005 Express

Thanks.
I am Italian

By google translator
Logged
lab82
Guest
« Reply #1 on: 12 Oct '07 - 12:51 »
Reply with quoteQuote

example?
Thanks....
Logged
muntablues
Posts: 192


« Reply #2 on: 12 Oct '07 - 12:56 »
Reply with quoteQuote

Hi lab82

Install http://www.un4seen.com/filez/4/Bass23.Net20.zip and be happy. There are many examples inside...

MB
Logged
lab82
Guest
« Reply #3 on: 12 Oct '07 - 14:27 »
Reply with quoteQuote

ok,
Thanks....
Logged
lab82
Guest
« Reply #4 on: 12 Oct '07 - 19:28 »
Reply with quoteQuote

up. mini example player mp3?

thanks.
Logged
radio42
Posts: 4030


« Reply #5 on: 12 Oct '07 - 20:03 »
Reply with quoteQuote

what do you mean by "mini example mp3"?
Aren't the provided samples good enough?
Logged
muntablues
Posts: 192


« Reply #6 on: 12 Oct '07 - 22:34 »
Reply with quoteQuote

Hi lab82

Donīt get me wrong, but you should learn C# programming first...

If you havenīt got the basic skills it makes no sense...

MB
Logged
lab82
Guest
« Reply #7 on: 15 Oct '07 - 12:44 »
Reply with quoteQuote

Hello,
You can see my example that I have done to you and I hope someone to help me finish it.

www.lab82.org/bass/minimp3player.zip

To compress the data,
I used this compressor: http://www.izarc.org/


Thanks.
Logged
lab82
Guest
« Reply #8 on: 15 Oct '07 - 13:42 »
Reply with quoteQuote

ok,
button play:
Almost succeeded.

private void buttonPlay_Click(object sender, System.EventArgs e)
{

Bass.BASS_StreamFree(_stream);
            textBox2.Text = "e:\\mp3\\80mix\\One Shot 1980 [CD ONE]\\Blondie - Call me.mp3";
            if (_fileName != textBox2.Text)
            {
                // create the stream
                _stream = Bass.BASS_StreamCreateFile(textBox2.Text, 0, 0, BASSStream.BASS_SAMPLE_FLOAT | BASSStream.BASS_STREAM_PRESCAN);


                if (_stream != 0 && Bass.BASS_ChannelPlay(_stream, false))
                {
                    this.textBox1.Text = "";
                    // _updateTimer.Start();

                    // get some channel info
                    BASS_CHANNELINFO info = new BASS_CHANNELINFO();
                    Bass.BASS_ChannelGetInfo(_stream, info);
                    this.textBox1.Text += "Info: " + info.ToString() + Environment.NewLine;
                    // display the tags...
                    TAG_INFO tagInfo = new TAG_INFO(_fileName);
                    if (BassTags.BASS_TAG_GetFromFile(_stream, tagInfo))
                    {
                        // and display what we get
                        this.textBoxAlbum.Text = tagInfo.album;
                        this.textBoxArtist.Text = tagInfo.artist;
                        this.textBoxTitle.Text = tagInfo.title;
                        this.textBoxComment.Text = tagInfo.comment;
                        this.textBoxGenre.Text = tagInfo.genre;
                        this.textBoxYear.Text = tagInfo.year;
                        this.textBoxTrack.Text = tagInfo.track;
                        this.pictureBoxTagImage.Image = tagInfo.PictureGetImage(0);
                        this.textBoxPicDescr.Text = tagInfo.PictureGetDescription(0);
                        if (this.textBoxPicDescr.Text == String.Empty)
                            this.textBoxPicDescr.Text = tagInfo.PictureGetType(0);
                    }
                    this.buttonStop.Enabled = true;
                    this.buttonPlay.Enabled = false;
                }
                else
                {
                    int error = Bass.BASS_ErrorGetCode();
                    Console.WriteLine(Enum.GetName(typeof(BASSErrorCode), error));
                }
            }
}

Logged
lab82
Guest
« Reply #9 on: 15 Oct '07 - 14:16 »
Reply with quoteQuote

ok,
thanks.

How to change code :

this.labelTime.Text = String.Format("Elapsed: {0:#0.00} - Total: {1:#0.00} - Remain: {2:#0.00}", Utils.FixTimespan(elapsedtime, "MMSS"), Utils.FixTimespan(totaltime, "MMSS"), Utils.FixTimespan(remainingtime, "MMSS"));

in textbox3.text or textbox4.text?

thanks.
Logged
radio42
Posts: 4030


« Reply #10 on: 15 Oct '07 - 14:43 »
Reply with quoteQuote

this.textbox3.Text = String.Format("Elapsed: {0:#0.00} - Total: {1:#0.00} - Remain: {2:#0.00}", Utils.FixTimespan(elapsedtime, "MMSS"), Utils.FixTimespan(totaltime, "MMSS"), Utils.FixTimespan(remainingtime, "MMSS"));
?!
Logged
lab82
Guest
« Reply #11 on: 15 Oct '07 - 15:10 »
Reply with quoteQuote

Hi and thanks,
Then tell me how to put the current time and finish time in two ... Example:

TxtElapsed.Text
TxtTotal.Text
TxtRemain.Text

Thanks
Logged
radio42
Posts: 4030


« Reply #12 on: 15 Oct '07 - 16:13 »
Reply with quoteQuote

this.TxtElapsed.Text = String.Format("Elapsed: {0:#0.00}", Utils.FixTimespan(elapsedtime, "MMSS"));

this.TxtTotal.Text = String.Format("Total: {0:#0.00}", Utils.FixTimespan(totaltime, "MMSS"));

this.TxtRemain.Text = String.Format("Remain: {0:#0.00}", Utils.FixTimespan(remainingtime, "MMSS"));

Really don't get me wrong, but this stuff is really rather simply and absolute basic C# stuff. It has nothing to do with any adio processing nor BASS.
I really suggest you first start learning the basic C# stuff, since audio processing is absolutly for advanced and very experianced programmers!
Logged
lab82
Guest
« Reply #13 on: 15 Oct '07 - 16:39 »
Reply with quoteQuote

Thanks a lot.

Before study, the Base c#    
And then begin with the bass

Thank you very much.
Luigi.amorfini

by translater by google
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines