English
Source / code snippets

Play Audio Sound

 

Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Sound: Audio-CD Play
CD Play by MCI Dieter Zornow
declare CDerror&

Proc CD_Open  Öffnet The CD Device and setting Zeitformat

    Declare open$
    parameters laufw$
    let open$=@Translate$(OPEN LW type cdaudio alias CD  shareable,LW,laufw$)
    @$ MCISend(open$)
    @$ MCISend(SET CD TIME FORMAT tmsf) Zeitformat Track, minutes, sec, Frames
    @$ MCISend(SET CD TIME FORMAT msf) Zeitformat minutes, sec, Frames
    @$ MCISend(SET CD TIME FORMAT ms) Zeitformat Milisekunden
    @$ MCISend(SET CD AUDIO ALL ON) Öffnet Audio output on both Kanälen (OFF closes, Left ON, Right On and off)

ENDPROC

Proc CD_Stop

    @$ MCISend(STOP CD) Stoppt the Play

ENDPROC

Proc CD_Close

    @$ MCISend(CLOSE CD) closes The Device

ENDPROC

proc CD_Error

    if %mcierror

        declare tz$,mess$
        let tz$=Device Error
        let mess$=Sorry, The Player can´t play the CD,
        please make sure your default drive is ready to play
        and try again.
        @messagebox(mess$,tz$,48)
        CD_Close
        let CDerror&=1
        return CDerror&

    endif

    let CDerror&=0
    return CDerror&

endproc

Proc CD_present

    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD MEDIA PRESENT)  is a CD potted?
    Return CD_Result$ (True, false)

Endproc

Proc CD_Ready

    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD READY)  is the unit ready ?
    Return CD_Result$ (True, false)

Endproc

Proc CD_Opendoor

    @$ MCISend(Set CD door open) Öffnet The CD Schublade

ENDPROC

Proc CD_Closedoor

    @$ MCISend(Set CD door closed) closes The CD Schublade

ENDPROC

Proc CD_Play

    CD_ERROR
    case equ(CDerror&,0):@$ MCISend(PLAY CD)  game The whole CD

ENDPROC

Proc CD_PlayFromTo

    parameters from$,to$
    CD_Error
    case equ(CDerror&,0):@$ MCISend(PLAY CD FROM +from$+ TO +To$)  game The CD of Track To Track with Parameter from$ to$

ENDPROC

Proc CD_SeekToEnd

    CD_Error
    case equ(CDerror&,0):@$ MCISend(SEEK CD TO END) seek along To to that end

ENDPROC

Proc CD_SeekToStart

    CD_error
    case equ(CDerror&,0):@$ MCISend(SEEK CD TO START) seek Rückwärts To to that beginning

ENDPROC

Proc CD_SeekTO

    Parameters pos$
    @$ MCISend(SEEK CD TO +pos$) seek To to position Track or Frame(Parameter Track or Frame)

ENDPROC

Proc CD_PlayWait

    CD_Error
    case equ(CDerror&,0):@$ MCISend(PLAY CD WAIT) game The cd and the Program holds on

ENDPROC

Proc CD_Pause

    @$ MCISend(PAUSE CD) Pausiert, some driver play at 2ten time interval moreover /RESUME/

ENDPROC

Proc CD_Resume

    @$ MCISend(RESUME CD) game to interval moreover on the equal place

ENDPROC

Proc CD_Status

    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD MODE)shows whom status
    Return CD_Result$ (stopped, playing, paused, hardship ready open, seeking.)

ENDPROC

Proc CD_Break

    @$ MCISend(Break CD on 27)Waitplay Cancel with ESC Button

endproc

Proc CD_T_number

    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD NUMBER OF TRACKS)  amount the Musikstücke
    Return CD_Result$

endproc

Proc CD_length

    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD LENGTH)  length the music CD
    Return CD_Result$

Endproc

Proc CD_CurrentTr

    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD CURRENT TRACK )  Nr the actually Tracks
    Return CD_Result$

Endproc

Proc CD_Tracklength

    parameters nr$
    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD LENGTH TRACK +nr$)  length the actually Titels (parameter nr$)
    Return CD_Result$

Endproc

Proc CD_position

    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD POSITION) actually position on the CD
    Return CD_Result$

Endproc

Proc CD_TSposition

    parameters nr$
    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD POSITION TRACK +nr$) Startposition the Tracks parameter Nr%
    Return CD_Result$

Endproc

Proc CD_Sposition

    Declare CD_Result$
    Let CD_Result$=@$ MCISend(STATUS CD START POSITION) Startposition on the CD
    Return CD_Result$

Endproc

Proc CD_Info

    Declare CD_Result$
    Let CD_Result$=@$ MCISend(INFO CD PRODUKT) gives name the CD_Laufwerkes
    Return CD_Result$

Endproc

proc CD_muteON

    @$ MCISend(SET CD AUDIO ALL OFF)

endproc

proc CD_muteOFF

    @$ MCISend(SET CD AUDIO ALL ON)

endproc

example
cls
Declare status$
CD_Open I: Laufwerksbuchstabe adjust
CD_Ready
Print CD Device ready?:,@$(0)
CD_present
Print CD present:,@$(0)
CD_Status
print status:,@$(0)
CD_length
Print length the CD:,@$(0)
CD_T_number
print amount Musikstücke:,@$(0)
CD_TSposition 1
Print Trackpos 1:,@$(0)
CD_TSposition 2
Print Trackpos 2:,@$(0)
CD_Tracklength 1
Print Tracklänge 1:,@$(0)
CD_PlayFromTo 2,3 or CD_Play for The whole CD with track indicated Zeitformat tmsf
CD_Ready
Print CD Device ready?:,@$(0)
CD_TSposition 2
Print Trackpos 2:,@$(0)
CD_Status
print status:,@$(0)

whilenot equ$(status$,stopped)

    CD_Status
    let status$=@$(0)
    CD_position
    locate 12,0
    print @$(0)

wend

waitinput
CD_Stop
CD_CLOSE
 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.368 Views

Untitledvor 0 min.
Gast.081508/25/24
Frank04/16/21
Gast-081507/24/15
Georg Teles03/18/14
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie