2 Sep '10 - 20:09 *
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: BASS/BASSMIDI & Visual FoxPro  (Read 822 times)
Chemberzhy
Posts: 4


« on: 12 Dec '09 - 11:51 »
Reply with quoteQuote

Hello!
Show, please, a work example bass.dll and bassmidi.dll  in Visual FoxPro
Logged
Chemberzhy
Posts: 4


« Reply #1 on: 12 Dec '09 - 11:52 »
Reply with quoteQuote

Sorry.
It's from Ukraine.
Excuse for my bad English.
Logged
Ian @ un4seen
Administrator
Posts: 11289


« Reply #2 on: 14 Dec '09 - 13:21 »
Reply with quoteQuote

I haven't heard of anyone using BASS with Visual FoxPro, so I think it is unlikely that anyone will be able to help you with that. I'm afraid you will probably have to work it out yourself, eg. from the provided APIs.
Logged
Erazer
Posts: 378


« Reply #3 on: 18 Dec '09 - 00:54 »
Reply with quoteQuote

Hello!
Show, please, a work example bass.dll and bassmidi.dll  in Visual FoxPro

Do not to bring to shame to our country  Wink And forget about Visual FoxPro at last  Grin
Logged
greenbear
Posts: 1


« Reply #4 on: 27 Dec '09 - 19:48 »
Reply with quoteQuote

Hello Chemberzhy,

the Bass Audio Library and Visual FoxPro are good choices. I use the Bass.DLL in my own Audio Player to play flac and mp3 Song files.

First you need a Program File to DECLARE the Bass Functions in Visual FoxPro. There is an Example in Visual Basic Sourcecode from un4seen. The VB Sourcecode must translate from VB to VFP Language. For Example
*-- Decl_Bass.PRG
*..
*-- Visual Basic Sourcerow
*Declare Function BASS_Start  Lib "bass.dll" () As Long
*-- change to Visual FoxPro  Syntax
 DECLARE LONG     BASS_Start  IN  "bass.dll"

*-- VB Sourcerow
*Declare Function BASS_Stop   Lib "bass.dll" () As Long
 DECLARE LONG     BASS_Stop   IN  "bass.dll"

*-- VB Sourcerow
*Declare Function BASS_Pause  Lib "bass.dll" () As Long
 DECLARE LONG     BASS_Pause  IN  "bass.dll"
*..
In the VB Sourcefile, I thing it is named Bass.bas, are some hundred rows, but to play Song files you don’t need all of them.

In the next step, youre Main Program must start youre Decl_Bass.PRG, like this.
*-- Main.PRG
..
*-- Bass Declarations
DO "Source\Decl_Bass.PRG"
..
*-- Start Player Form
DO FORM "Source\AudioPlayer.SCX"
READ EVENTS
..

In my Player Form I use different methods for select Song files from Table to View, play Song, play random Song and so on. Here I use the DECLAREd Bass Functions. For example:
*-- frmPlayer.Load()
IF BASS_Init(-1, 44100, 0, (THISFORM.HWND), 0) = BASSFALSE THEN
   THISFORM.gx_BassError("Can't initialize digital sound system")
ENDIF

*-- frmPlayer.PlaySong()
** Start play
** -------------------------------------------------
** lRetVal = BASS_ChannelPlay( nHandle, lTrueFalse )
** -------------------------------------------------
** lTrue  :Restart, play the stream from the start
** lFalse :Play the music continue from current position
IF NOT(BASS_ChannelPlay( THISFORM.gnHStream, BASSTRUE ) # 0) THEN
   THISFORM.gx_BassError("Can't play Stream")
ENDIF

*-- frmPlayer.UnLoad()
*-- Close Sound System and release everything
BASS_Free()
BASS_PluginFree(1)
I hope this replay can help.
Logged
Erazer
Posts: 378


« Reply #5 on: 28 Dec '09 - 00:40 »
Reply with quoteQuote

You are crazy guys!  Wink
Logged
Chemberzhy
Posts: 4


« Reply #6 on: 2 Jan '10 - 18:09 »
Reply with quoteQuote

2 greenbear

Thanks!

I have already written player MP3.

I write Karaoke a player on bassmidi.dll.

Already all works, except rate and tonality adjustment.

It is impossible.
Logged
Chemberzhy
Posts: 4


« Reply #7 on: 3 Jan '10 - 11:10 »
Reply with quoteQuote

I can not connect BASS_ChannelSetSync.
There is an error
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.035 seconds with 15 queries.