Results 1 to 16 of 16

Thread: music

  1. #1

    Thread Starter
    Banned
    Join Date
    Dec 2000
    Location
    USA, NJ
    Posts
    72

    Unhappy

    How do I make a media player in "pure c++"??? This has to be able to play stop fast forward rewind if you can only get one of those things to work I would still love to look at it. This would be come up in DOS. If you don't know how to do this but think you might know how then plz tell me. Note: im a new C++ programmer but im pretty good at vb 6.0.

    For those of you who do not know what "pure c++" is, it is c++ that doesn't use anything that Microsoft's C++ gives you. You do all the code on your own and only use dll's that you made. In fact the only reason you use Microsoft's c++ is because it gives you a compiler.

    Thx nukem

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    If you're new at C++ then you're going to kick yourself trying to do this. However, I did have some code lying around. What are you trying to play?

    PS - look at the source code to cubic player: http://www.cubic.org
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    What do you mean use only dll's that you made. Do you mean no API.
    In that case parksie is right , you're really going to kick yourself trying to do this.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4

    Thread Starter
    Banned
    Join Date
    Dec 2000
    Location
    USA, NJ
    Posts
    72

    Lightbulb Linux

    Well yes. But if I can run it on Linux and Windows it would be just what I'm looking for. I'm hopping in the future to be able to play all sound files. But right now since I only have mp3's and wav's if it can play both or just one it would be great. With this project I have gotten a lot further in vb. that cause I'm really good at vb, but a newbie at c++.
    Thx nukem

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    In that case Cubic is exactly what you need. It plays both and works on Linux and DOS.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6

    Thread Starter
    Banned
    Join Date
    Dec 2000
    Location
    USA, NJ
    Posts
    72

    Talking WOW

    parksie that is some amazing code!!! the one thing that i suggest is to make it play when you are not in the window, and to make it more visual. i have know that threw code you can do some amazing graphics this is how they do graphics in games. i think thats what you should add to it. thank you so much.
    nukem

  7. #7
    Guest
    you can't really make an app in "pure C++", well the way you describe it....

    you would have to make most of it in ASM...

    C++ does not consist of much... it's the header files, and DLL's that gives it it's functionality...


    and what I consider "pure c++", is not using any MFC(microsoft) or VCL(borland) and making the windows and stuff, using APIs, like CreateWindow(or CreateWindowEx)...


    this is just my opinion tho...

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169

    Re: WOW

    Originally posted by nukem996
    parksie that is some amazing code!!! the one thing that i suggest is to make it play when you are not in the window, and to make it more visual. i have know that threw code you can do some amazing graphics this is how they do graphics in games. i think thats what you should add to it. thank you so much.
    nukem
    Er...hehe...but...I didn't write any of it . Although my project for next year is a sequencer .
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  9. #9

    Thread Starter
    Banned
    Join Date
    Dec 2000
    Location
    USA, NJ
    Posts
    72

    Wink 32 bit

    Well tell who ever wrote it its great. And I noticed that it's an 8-bit program. And when I was playing my mp3's. It was really bad sound quality. So. . . I will try to go threw the code and turn it into a 32 bit. And since 62 bit have came out (not to the public yet) I will try to program it for that. And to test it on Linux all I have to do is wait till they mail my computer. It keeps being delayed or something when I get it ill put on Linux.

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It's definitely 32bit - did you have it set up properly?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11

    Thread Starter
    Banned
    Join Date
    Dec 2000
    Location
    USA, NJ
    Posts
    72

    Question ???

    im not sure where i saw it but im pretty sure thats what it said. im using the cp.exe. is thier another one that i should be using???

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No - that is the correct one. It uses DOS4GW which allows it to access protected mode memory and basically do 32bit stuff
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  13. #13

    Thread Starter
    Banned
    Join Date
    Dec 2000
    Location
    USA, NJ
    Posts
    72

    Talking bad

    it still has bad quality.

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    In cp.ini try setting the following options (they're near the top):
    Code:
      ampegtomono=off
      ampegmaxrate=48000
      mixrate=44100           ; -sr44100
      mixprocrate=4096000     ; max channels*rate (for slow cpus) (4096000==64*64000)
      mix16bit=on             ; -s8-
      mixstereo=on            ; -sm-
      plrbufsize=500          ; milliseconds
      mixbufsize=500          ; milliseconds
      samprate=44100          ; -sr44100
      samp16bit=on            ; -s8-
      sampstereo=on           ; -sm-
      smpbufsize=2000         ; milliseconds
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  15. #15

    Thread Starter
    Banned
    Join Date
    Dec 2000
    Location
    USA, NJ
    Posts
    72

    Question ???

    mine looks like this:

    ; opencp 2.5.0 kb980717 configuration file
    ; modified version with dll autoloader support (the "link"-lists got a little
    ; shorter...)

    [general]
    link=dos4gfix mmcmphlp pfilesel cpiface cphlpif fstypes
    ultradir=; path to ULTRASND.INI
    dos4gfix=off
    ; datapath= ; path to opencp's pictures and animations.
    ; tempdir=


    [defaultconfig] ; default configuration
    link=plrbase mcpbase arcarj arczip arcrar arcumx arcbpa arclha arcace playcda playinp
    prelink= ; preloaded dlls


    [sound] ; default sound section
    ; these drivers will be loaded at startup. change parameters at the
    ; sections for the devices.
    ; take those drivers out of the list, you will not need, because it
    ; will speed up the loading process and require less memory
    ; you can also add new devices by copying the section and renaming it.
    ; (8 chars only)
    ; note: the first device found in each list will be uses as default

    playerdevices=devpWSS devpGUS devpEWS devpESS devpPAS devpSB devpNone devpDisk devpMPx
    samplerdevices=devsWSS devsGUS devsPAS devsSB devsNone
    wavetabledevices=devwMixQ devwIW devwGUS devwDGUS devwSB32 devwMix devwNone

    ampegtomono=off
    ampegmaxrate=48000
    mixrate=44100 ; -sr44100
    mixprocrate=4096000 ; max channels*rate (for slow cpus) (4096000==64*64000)
    mix16bit=on ; -s8-
    mixstereo=on ; -sm-
    plrbufsize=1000 ; milliseconds
    mixbufsize=1000 ; milliseconds
    samprate=44100 ; -sr44100
    samp16bit=on ; -s8-
    sampstereo=on ; -sm-
    smpbufsize=2000 ; milliseconds
    defplayer= ; -sp
    defsampler= ; -ss
    defwavetable= ; -sw
    midichan=64 ; number of channels used for midi playback
    itchan=64
    cdsamplelinein=off ; if you turn this one on, cp will sample line in
    ; instead of cd in when playing cdaudio
    bigmodules=devwMixQ ; this wavetable device will be used if a module
    ; was tagged "big" with alt-b in the fileselector.
    ; (use if wavetable ram is not enough by far)
    wavetostereo=1 ; conv mono waves to stereo. turn off with sbpro
    waveratetolerance=50 ; samprate can vary up to 50/1000
    amplify=100 ; -va100
    panning=100 ; -vp100
    volume=100 ; -vv100
    balance=0 ; -vb0
    reverb=0 ; -vr0
    chorus=0 ; -vc0
    surround=off ; -vs-
    filter=1 ; -vf1 (AOI)



    [screen] ; default screen section
    usepics=daposer.gif
    compomode=off ; compomode will remove all texts and display
    ; fileselector comment as the name (put compo # there!)
    startupmode=text ; mode
    screentype=2 ; screenmode

    ; palette=0 4 1 5 2 6 3 7 8 c 9 d a e b f ; text mode color mapping
    ; palette=0 6 6 6 6 6 6 e 6 6 e e e e e e
    ; palette=0 2 2 2 2 2 2 a 2 2 a a a a a a
    ; palette=1 2 4 7 5 3 6 7 9 a c f d b e f

    analyser=on
    mvoltype=1
    pattern=on
    insttype=0
    channeltype=1





    [fileselector] ; default fileselector section
    ; files with these extensions will be scanned by the fileselector
    ; you might add 001 002 003 004 if you are a fan of imphobia
    modextensions=MOD S3M XM IT MDL DMF ULT AMS MTM 669 NST WOW OKT PTM žM MXM MID WAV RMI MP1 MP2 MP3 SID DAT PLS M3U PLT
    movepath= ; default path to move files
    screentype=2
    typecolors=on
    editwin=on
    writeinfo=on
    scanmdz=on
    scaninarcs=on
    scanmodinfo=on
    scanarchives=on
    putarchives=on
    playonce=on
    randomplay=on
    loop=on
    path=.


    ;device configuration:
    ;[handle]
    ; link=... (internal) link drivers
    ; subtype=... subtype
    ; port=... primary port (hex)
    ; port2=... secondary port (hex)
    ; irq=... primary irq
    ; irq2=... secondary irq
    ; dma=... primary dma
    ; dma2=... secondary dma
    ; bypass=... bypass detect on/off
    ; keep=... when 1, keeps driver resident

    [devpSB]
    link=devpsb
    sbrevstereo=off ; some sb pros reverse stereo...
    ; subtype: 1:sb 1.x, 2:sb 2.x, 3:sb pro, 4:sb16

    [devpESS]
    link=devpess

    [devpEWS]
    link=devpews
    reverb=75 ; reverb amount
    surround=10 ; v-space amount
    ; (the above do NOT work in a windows 95 DOS box,
    ; please adjust the mixer by yourself)

    [devpWSS]
    link=devpwss
    wss64000=off ; 64khz playing
    ; subtype: 0:wss, 1:gus daughterboard, 2:gusmax

    [devpGUS]
    link=devpgus

    [devpPAS]
    link=devppas

    [devpDisk]
    link=devpdisk
    diskManual=off ; press alt-s to start diskwriter if enabled

    [devpMPx]
    link=devpmpx
    diskManual=off ; press alt-s to start diskwriter if enabled
    layer=2 ; 1 or 2
    mode=1 ; 0:stereo, 1:joint stereo, 2:dual channel, 3:mono
    freq=44100 ; 32000,48000,44100
    rate=112000 ; ampeg bitrate
    model=2 ; psychoacoustic model: (1 or) 2
    crc=off
    extension=off
    copyright=off
    original=off
    emphasis=0

    [devpNone]
    link=devpnone

    [devsSB]
    link=devssb
    sbrevstereo=off ; some sb pros reverse stereo...

    [devsGUS]
    link=devsgus

    [devsWSS]
    link=devswss
    wss64000=off ; 64khz sampling

    [devsNone]
    link=devsnone

    [devwGUS]
    link=devwgus
    gusFastUpload=off
    gusGUSTimer=on

    [devwDGUS]
    link=devwdgus
    ; port2=250 ;must specify secondary port
    ; subtype: 0:2d, 1:3d

    [devwIW]
    link=devwiw
    iwIWTimer=off ; turn this on for Win9x bg playing
    iwEffects=on ; uses some iw mem and channels
    iwForceEffects=off ; 28 channels max.

    [devwSB32]
    link=devwsb32

    [devwNone]
    link=devwnone

    [devwMix]
    link=devwmix
    mixResample=off
    subtype=0
    postprocs=
    postprocadds=

    [devwMixQ]
    link=devwmix
    subtype=1
    mixResample=off
    postprocs=
    postprocadds=


    ; archiver configuration
    ; %% -> %
    ; %a -> archive path
    ; %n -> filename
    ; %d -> destination path

    [arcZIP]
    get=pkunzip %a %d %n
    put=pkzip %a %n
    delete=pkzip -d %a %n
    deleteempty=on ; pkzip will not remove empty archives, this will delete
    ; all 22 byte archives.


    [arcARJ]
    get=arj e %a %d %n
    put=arj a %a %n
    delete=arj d %a %n
    moveto=arj m %a %n

    [arcRAR]
    get=rar e -std %a %d %n
    put=rar a -std %a %n

    [arcLHA]
    get=lha e %a %d %n

    [arcACE]
    get=ace32 e %a %n %d
    scaninsolid=false ; scan in solid archives? (better no



    [filetype 0]
    color=1
    name=MOD
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer


    [filetype 1]
    color=4
    name=MODd
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer


    [filetype 2]
    color=4
    name=MODt
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer


    [filetype 3]
    color=4
    name=M31
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer


    [filetype 6]
    color=4
    name=M15
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer


    [filetype 7]
    color=4
    name=M15t
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer


    [filetype 8]
    color=4
    name=WOW
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer


    [filetype 9]
    color=2
    name=S3M
    interface=_plOpenCP
    pllink=playgmd
    player=_gmdPlayer
    ldlink=loads3m
    loader=mpLoadS3M_


    [filetype 10]
    color=3
    name=XM
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer


    [filetype 11]
    color=1
    name=MTM
    interface=_plOpenCP
    pllink=playgmd
    player=_gmdPlayer
    ldlink=loadmtm
    loader=mpLoadMTM_


    [filetype 12]
    color=2
    name=669
    interface=_plOpenCP
    pllink=playgmd
    player=_gmdPlayer
    ldlink=load669
    loader=mpLoad669_


    [filetype 13]
    color=5
    name=ULT
    interface=_plOpenCP
    pllink=playgmd
    player=_gmdPlayer
    ldlink=loadult
    loader=mpLoadULT_


    [filetype 14]
    color=6
    name=DMF
    interface=_plOpenCP
    pllink=playgmd
    player=_gmdPlayer
    ldlink=loaddmf
    loader=mpLoadDMF_


    [filetype 15]
    color=5
    name=OKT
    interface=_plOpenCP
    pllink=playgmd
    player=_gmdPlayer
    ldlink=loadokt
    loader=mpLoadOKT_


    [filetype 16]
    color=3
    name=MID
    interface=_plOpenCP
    pllink=playgmi
    player=_gmiPlayer


    [filetype 17]
    color=6
    name=CDA
    interface=_plOpenCP
    pllink=playgmd
    player=_cdaPlayer

    [filetype 18]
    color=4
    name=MIDd
    interface=_plOpenCP
    pllink=playgmi
    player=_gmiPlayer

    [filetype 19]
    color=2
    name=PTM
    interface=_plOpenCP
    pllink=playgmd
    player=_gmdPlayer
    ldlink=loadptm
    loader=mpLoadPTM_

    [filetype 21]
    color=6
    name=MDL
    interface=_plOpenCP
    pllink=playgmd
    player=_gmdPlayer
    ldlink=loadmdl
    loader=mpLoadMDL_

    [filetype 22]
    color=3
    name=AMS
    interface=_plOpenCP
    pllink=playgmd
    player=_gmdPlayer
    ldlink=loadams
    loader=mpLoadAMS_

    [filetype 23]
    color=2
    name=INP
    interface=_plOpenCP
    pllink=playinp
    player=_inpPlayer

    [filetype 24]
    color=6
    name=DEVp
    interface=_plrIntr

    [filetype 25]
    color=5
    name=DEVs
    interface=_smpIntr

    [filetype 26]
    color=3
    name=DEVw
    interface=_mcpIntr

    [filetype 27]
    color=5
    name=IT
    interface=_plOpenCP
    pllink=playit
    player=_itpPlayer

    [filetype 28]
    color=6
    name=WAV
    interface=_plOpenCP
    pllink=playwav
    player=_wavPlayer

    [filetype 30]
    color=6
    name=MPx
    interface=_plOpenCP
    pllink=playmp
    player=_ampegpPlayer

    [filetype 31]
    color=6
    name=SID
    interface=_plOpenCP
    pllink=playsid
    player=_sidPlayer

    [filetype 32]
    color=3
    name=MXM
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer

    [filetype 33]
    color=3
    name=MODf
    interface=_plOpenCP
    pllink=playxm
    player=_xmpPlayer




    [filetype 128]
    color=7
    name=PLS
    handler=_fsAddPLS

    [filetype 129]
    color=7
    name=M3U
    handler=_fsAddM3U



  16. #16
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    That looks okay, apart from:
    Code:
    playerdevices=devpWSS devpGUS devpEWS devpESS devpPAS devpSB devpNone devpDisk devpMPx
    Try reordering them to put the one for your sound card first (ie, Sound Blaster is devpSB).

    What sound card do you have?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width