home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / Svet_OS2 / PLAY_11 / POPPL110.ZIP / poprexx.INF (.txt) < prev    next >
OS/2 Help File  |  1996-10-25  |  25KB  |  1,360 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Disclaimer ΓòÉΓòÉΓòÉ
  3.  
  4.  
  5. POP-Play is supplied as is with no warranty whatsoever. All I can say is 
  6. that it works for me and will occupy space on your hard disk. 
  7.  
  8.  
  9. ΓòÉΓòÉΓòÉ 2. Registeration ΓòÉΓòÉΓòÉ
  10.  
  11.  
  12. POP-Play is SHAREWARE product if you intend to use it COMMERCIALLY. 
  13.  
  14. Basically the rule is: If you're asking money for the product you're using 
  15. POP-Play with, you have to register. 
  16.  
  17. Registering POP-Play gives you the right to sell an unlimited number of 
  18. copies of the product you're using it for. 
  19.  
  20. A POP-Play registration cannot be transferred from one person to another, 
  21. or  from one person to a company, or from one company to another company. 
  22.  
  23. To register send $20 USD to: 
  24.  
  25.           Seppo Lehikoinen 
  26.           Kolmas linja 19 D 87 
  27.           00530 Helsinki 
  28.           FINLAND 
  29.  
  30.           slehiko@ibm.net 
  31.  
  32.  
  33. ΓòÉΓòÉΓòÉ 3. Rexx interface functions ΓòÉΓòÉΓòÉ
  34.  
  35.  
  36. subchapters: 
  37. PopAddWav 
  38. PopChannels 
  39. PopDropFuncs 
  40. PopGetPatPos 
  41. PopGetSongBPM 
  42. PopGetSongPos 
  43. PopGetSongSpeed 
  44. PopGetVolume 
  45. PopInfo 
  46. PopInitWav 
  47. PopLoadFuncs 
  48. PopMaxSongPos 
  49. PopNextSongPos 
  50. PopPause 
  51. PopPlay 
  52. PopPlayThread 
  53. PopPlayWav 
  54. PopPrevSongPos 
  55. PopReadDir 
  56. PopSetDriver 
  57. PopSetLooping 
  58. PopSetPriority 
  59. PopSetSongPos 
  60. PopSetVolume 
  61. PopSleep 
  62. PopStatus 
  63. PopStop 
  64. PopVersion 
  65.  
  66. next chapter: 
  67. Rexx example 
  68.  
  69.  
  70. ΓòÉΓòÉΓòÉ 3.1. PopAddWav ΓòÉΓòÉΓòÉ
  71.  
  72.  
  73. PopAddWav 
  74.  
  75. Adds user sound effects to the memory. Maximum 128 effects are possible. 
  76.  
  77.  
  78. Syntax 
  79.  
  80. wavhnd = PopAddWav(filename) 
  81.  
  82.  
  83. Parameters 
  84.  
  85. filename 
  86. Name of the wave file. RIFF,WAV and FMT-type mono wave files are supported. 
  87.  
  88.  
  89. Return 
  90.  
  91. wavhnd 
  92. Wave handle. Integer value beetween 0..127. 
  93.  
  94.  
  95. NOTICE! 
  96.  
  97. Waves are actually loaded in the PopPlayThread() function so don't try add 
  98. extra effects during play or pause it won't work. If you need diffrent set 
  99. of waves, stop the playing, add effects and call PopPlayThread() again. 
  100. All old waves are destoyed from the memory when a stop is issued. 
  101.  
  102. Use always the following order to add extra WAVs 
  103.  
  104.           call PopInitWav 2          /* HAVE TO BE FIRST!*/ 
  105.           wavhnd1 = PopAddWav( wavfile1 )   /* sound effect 1 */ 
  106.           wavhnd2 = PopAddWav( wavfile2 )   /* sound effect 2 */ 
  107.           wavhnd3 = PopAddWav( wavfile3 )   /* sound effect 3 aso...*/ 
  108.           status = PopPlayThread( modfile,freq,bits,chan,pri ) 
  109.  
  110.           call PopPlayWav wavhnd2,usrchn,freq,vol,pan 
  111.  
  112.  
  113.  See also 
  114.  
  115.  PopInitWav, PopPlayWav 
  116.  
  117.  
  118.  Since 
  119.  
  120.  1.00 
  121.  
  122.  
  123. ΓòÉΓòÉΓòÉ 3.2. PopChannels ΓòÉΓòÉΓòÉ
  124.  
  125.  
  126. PopChannels 
  127.  
  128. Get channel count from the played song including user channels. 
  129. Maximum channel count is 32. 
  130.  
  131.  
  132. Syntax 
  133.  
  134. channels=PopChannels() 
  135.  
  136.  
  137. Return 
  138.  
  139. channels 
  140. Integer value beetween 0 to 32. Channel value zero 
  141. indicates that there is no song currenly available. 
  142.  
  143.  
  144. Since 
  145.  
  146. 1.00 
  147.  
  148.  
  149. ΓòÉΓòÉΓòÉ 3.3. PopDropFuncs ΓòÉΓòÉΓòÉ
  150.  
  151.  
  152. PopDropFuncs 
  153.  
  154. Deregister player functions. 
  155.  
  156.  
  157. Syntax 
  158.  
  159. call PopDropFuncs 
  160.  
  161.  
  162. Return 
  163.  
  164. nothing 
  165.  
  166.  
  167. See also 
  168.  
  169. PopLoadFuncs 
  170.  
  171.  
  172. Since 
  173.  
  174. always 
  175.  
  176.  
  177. ΓòÉΓòÉΓòÉ 3.4. PopGetPatPos ΓòÉΓòÉΓòÉ
  178.  
  179.  
  180. PopGetPatPos 
  181.  
  182. Gets pattern position. Positive integer value. 
  183.  
  184.  
  185. Syntax 
  186.  
  187. patpos=PopGetPatPos() 
  188.  
  189.  
  190. Return 
  191.  
  192. patpos 
  193. Pattern position. Positive integer value. 
  194.  
  195.  
  196. See also 
  197.  
  198. PopGetSongPos, PopSetSongPos, PopNextSongPos, PopPrevSongPos,PopGetSongBPM, 
  199. PopChannels 
  200.  
  201.  
  202. Since 
  203.  
  204. 1.00 
  205.  
  206.  
  207. ΓòÉΓòÉΓòÉ 3.5. PopGetSongBPM ΓòÉΓòÉΓòÉ
  208.  
  209.  
  210. PopGetSongBPM 
  211.  
  212. Gets beats per minute value. Positive integer value. 
  213.  
  214.  
  215. Syntax 
  216.  
  217. bpm=PopGetSongBPM() 
  218.  
  219.  
  220. Return 
  221.  
  222. bpm 
  223. Gets beats per minute value. Positive integer value. 
  224.  
  225.  
  226. See also 
  227.  
  228. PopGetSongPos, PopSetSongPos,PopNextSongPos, PopPrevSongPos,PopGetSongSpeed, 
  229. PopChannels 
  230.  
  231.  
  232. Since 
  233.  
  234. 1.00 
  235.  
  236.  
  237. ΓòÉΓòÉΓòÉ 3.6. PopGetSongPos ΓòÉΓòÉΓòÉ
  238.  
  239.  
  240. PopGetSongPos 
  241.  
  242.  
  243. Syntax 
  244.  
  245. songpos=PopGetSongPos() 
  246.  
  247.  
  248. Return 
  249.  
  250. songpos 
  251. Gets current song position. Positive integer value. 
  252.  
  253.  
  254. See also 
  255.  
  256. PopSetSongPos,PopNextSongPos, PopPrevSongPos 
  257.  
  258.  
  259. Since 
  260.  
  261. 1.00 
  262.  
  263.  
  264. ΓòÉΓòÉΓòÉ 3.7. PopGetSongSpeed ΓòÉΓòÉΓòÉ
  265.  
  266.  
  267. PopGetSongSpeed 
  268.  
  269. Gets songspeed. 
  270.  
  271.  
  272. Syntax 
  273.  
  274. speed=PopGetSongSpeed() 
  275.  
  276.  
  277. Return 
  278.  
  279. speed 
  280. Song speed. Positive integer value. 
  281.  
  282.  
  283. See also 
  284.  
  285. PopGetSongPos, PopGetSongBPM 
  286.  
  287.  
  288. Since 
  289.  
  290. v1.00 
  291.  
  292.  
  293. ΓòÉΓòÉΓòÉ 3.8. PopGetVolume ΓòÉΓòÉΓòÉ
  294.  
  295.  
  296. PopGetVolume 
  297.  
  298. Gets the master volume. 
  299.  
  300.  
  301. Syntax 
  302.  
  303. volume = PopGetVolume() 
  304.  
  305.  
  306. Return 
  307.  
  308. volume 
  309. Master volume from 0% to 100%. 
  310.  
  311.  
  312. See also 
  313.  
  314. PopSetVolume 
  315.  
  316.  
  317. Since 
  318.  
  319. v0.97 
  320.  
  321.  
  322. ΓòÉΓòÉΓòÉ 3.9. PopInfo ΓòÉΓòÉΓòÉ
  323.  
  324.  
  325. PopInfo 
  326.  
  327. Returns the copyright info string. 
  328.  
  329.  
  330. Syntax 
  331.  
  332. info = PopInfo() 
  333.  
  334.  
  335. Parameters 
  336.  
  337. None. 
  338.  
  339.  
  340. Return 
  341.  
  342. info 
  343. Copyright info string. 
  344.  
  345.  
  346. See also 
  347.  
  348. PopVersion 
  349.  
  350.  
  351. Since 
  352.  
  353. Always. 
  354.  
  355.  
  356. ΓòÉΓòÉΓòÉ 3.10. PopInitWav ΓòÉΓòÉΓòÉ
  357.  
  358.  
  359. PopInitWav 
  360.  
  361. Adds number of extra user channels to the player. Maximum 32 channels 
  362. is allowed. 
  363.  
  364.  
  365. Syntax 
  366.  
  367. call PopInitWav nr 
  368.  
  369.  
  370. Parameters 
  371.  
  372. nr 
  373. Number of channels to add 0 to 30. 
  374.  
  375.  
  376. Return 
  377.  
  378. Nothing. 
  379.  
  380.  
  381. See also 
  382.  
  383. PopAddWav, PopPlayWav 
  384.  
  385.  
  386. Since 
  387.  
  388. 1.00 
  389.  
  390.  
  391. ΓòÉΓòÉΓòÉ 3.11. PopLoadFuncs ΓòÉΓòÉΓòÉ
  392.  
  393.  
  394. PopLoadFuncs 
  395.  
  396. Register player functions. 
  397.  
  398.  
  399. Syntax 
  400.  
  401. call PopLoadFuncs 
  402.  
  403.  
  404. Params 
  405.  
  406. none 
  407.  
  408.  
  409. Return 
  410.  
  411. nothing 
  412.  
  413.  
  414. See also 
  415.  
  416. PopDropFuncs 
  417.  
  418.  
  419. Since 
  420.  
  421. always 
  422.  
  423.  
  424. ΓòÉΓòÉΓòÉ 3.12. PopMaxSongPos ΓòÉΓòÉΓòÉ
  425.  
  426.  
  427. PopMaxSongPos 
  428.  
  429. Get the maximum song position. 
  430.  
  431.  
  432. Syntax 
  433.  
  434. maxsongpos=PopMaxSongPos() 
  435.  
  436.  
  437. Return 
  438.  
  439. maxsongpos 
  440. Maximum song position. Positive integer value. 
  441.  
  442.  
  443. See also 
  444.  
  445. PopSetSongPos, PopGetSongPos 
  446.  
  447.  
  448. Since 
  449.  
  450. 1.00 
  451.  
  452.  
  453. ΓòÉΓòÉΓòÉ 3.13. PopNextSongPos ΓòÉΓòÉΓòÉ
  454.  
  455.  
  456. PopNextSongPos 
  457.  
  458. Jump to next song position. 
  459.  
  460.  
  461. Syntax 
  462.  
  463. call PopNextSongPos 
  464.  
  465.  
  466. Return 
  467.  
  468. nothing 
  469.  
  470.  
  471. See also 
  472.  
  473. PopSetSongPos, PopPrevSongPos 
  474.  
  475.  
  476. Since 
  477.  
  478. v1.00 
  479.  
  480.  
  481. ΓòÉΓòÉΓòÉ 3.14. PopPause ΓòÉΓòÉΓòÉ
  482.  
  483.  
  484. PopPause 
  485.  
  486. Toggle beetween PLAY and PAUSE. 
  487.  
  488.  
  489. Syntax 
  490.  
  491. call PopPause 
  492.  
  493.  
  494. Return 
  495.  
  496. nothing 
  497.  
  498.  
  499. See also 
  500.  
  501. PopStatus, PopPlay, PopPlayThread, PopStop 
  502.  
  503.  
  504. Since 
  505.  
  506. Always 
  507.  
  508.  
  509. ΓòÉΓòÉΓòÉ 3.15. PopPlay ΓòÉΓòÉΓòÉ
  510.  
  511.  
  512. PopPlay 
  513.  
  514. Plays the module file (no threading). 
  515.  
  516.  
  517. Syntax 
  518.  
  519. status = PopPlay( file, frequency, bits, channels, priority) 
  520.  
  521.  
  522. Parameters 
  523.  
  524. Frequency 
  525. Module mixing speed. Any value beetween 11025 to 44100 will be accepted. 
  526. Since some MMPM drivers do not allow all these values, use one of the 
  527. following; 11025, 22050 or 44100. 
  528.  
  529. bits 
  530. Soundcard's output sample size. 8 or 16 bits. 
  531.  
  532. channels 
  533. Stereo or mono playing. 
  534. 1 - mono 
  535. 2 - stereo 
  536.  
  537. priority 
  538. Sets predefined priority. Values 1,2,3 and 4 accepted. 
  539. Recomendation 3 or 4. 
  540.  
  541.  
  542. Return 
  543.  
  544. status 
  545. 0 = No error. 
  546. 1 = Can't open sound device. 
  547. 2 = Can't load module (module doesn't exist or illegal module type). 
  548. 3 = Channel count over 32. 
  549.  
  550.  
  551. See also 
  552.  
  553. PopPlayThread, PopStop, PopPlayWav 
  554.  
  555.  
  556. Function first time represented. 
  557.  
  558. Always (changed v1.00) 
  559.  
  560.  
  561. ΓòÉΓòÉΓòÉ 3.16. PopPlayThread ΓòÉΓòÉΓòÉ
  562.  
  563.  
  564. PopPlayThread 
  565.  
  566. Plays the module file using a thread 
  567.  
  568.  
  569. Syntax 
  570.  
  571. status = PopPlayThread( file, frequency, bits, channels, priority) 
  572.  
  573.  
  574. Parameters 
  575.  
  576. Frequency 
  577. Module mixing speed. Any value beetween 11025 to 44100 will be accepted. 
  578. Since some MMPM drivers do not allow all these values, use one of the 
  579. following; 11025, 22050 or 44100. 
  580.  
  581. bits 
  582. Soundcard's output sample size. 8 or 16 bits. 
  583.  
  584. channels 
  585. Stereo or mono playing. 
  586. 1 - mono 
  587. 2 - stereo 
  588.  
  589. priority 
  590. Sets predefined priority. Values 1,2,3 and 4 accepted. 
  591. Recomendation 3 or 4. 
  592.  
  593.  
  594. Return 
  595.  
  596. status 
  597. 0 = No error. 
  598. 4 = Thread error. 
  599.  
  600.  
  601. See also 
  602.  
  603. PopPlay, PopStop, PopPause, PopPlayWav 
  604.  
  605.  
  606. Since 
  607.  
  608. v0.97 
  609.  
  610.  
  611. ΓòÉΓòÉΓòÉ 3.17. PopPlayWav ΓòÉΓòÉΓòÉ
  612.  
  613.  
  614. PopPlayWav 
  615.  
  616.  
  617. Syntax 
  618.  
  619. status = PopPlayWav( wavnr,channel,freq,vol,pan ) 
  620.  
  621.  
  622. Parameters 
  623.  
  624. wawnr 
  625. Wave handle. 
  626.  
  627. channel 
  628. User channel ( 0 - depends how many you added  ) 
  629.  
  630. freq 
  631. Wave frequency. 
  632.  
  633. vol 
  634. Wave volume (0-255) 
  635.  
  636. pan 
  637. Wave balance (0-255, 127 is middle) 
  638.  
  639.  
  640. Return 
  641.  
  642. status 
  643. 0 = No error. 
  644. 7 = Parameter error. 
  645.  
  646.  
  647. See also 
  648.  
  649. PopInitWav, PopAddWav, PopPlay, PopPlayThread 
  650.  
  651.  
  652. Since 
  653.  
  654. 1.00 
  655.  
  656.  
  657. ΓòÉΓòÉΓòÉ 3.18. PopPrevSongPos ΓòÉΓòÉΓòÉ
  658.  
  659.  
  660. PopPrevSongPos 
  661.  
  662. Jump to previous song position 
  663.  
  664.  
  665. Syntax 
  666.  
  667. call PopPrevSongPos 
  668.  
  669.  
  670. Return 
  671.  
  672. nothing 
  673.  
  674.  
  675. See also 
  676.  
  677. PopNextSongPos, PopSetSongPos 
  678.  
  679.  
  680. Since 
  681.  
  682. v1.00 
  683.  
  684.  
  685. ΓòÉΓòÉΓòÉ 3.19. PopReadDir ΓòÉΓòÉΓòÉ
  686.  
  687.  
  688. PopReadDir 
  689.  
  690. Read all MODULEs in the directory. File extension could be anyting 
  691. ie XM.SBRIGADE is valid name for a module. 
  692.  
  693.  
  694. Syntax 
  695.  
  696. call PopReadDir dir,mask,file.,name.,type. 
  697.  
  698.  
  699. Parameters 
  700.  
  701. dir 
  702. Search directory 
  703.  
  704. mask 
  705. Mask for the search (usually "*.*") 
  706.  
  707.  
  708. Returned stem parameters 
  709.  
  710. file. 
  711. Filenames with full path. 
  712.  
  713. name. 
  714. Real song name 
  715.  
  716. type. 
  717. Module type ('Protracker' aso..) 
  718.  
  719.  
  720. Returns 
  721.  
  722. rc 
  723. 0  = No error. 
  724. 12 = Memory allocation error. 
  725.  
  726.  
  727. Limitations 
  728.  
  729. Maximum module count in one directory is 3000! 
  730.  
  731.  
  732. Since 
  733.  
  734. v0.90 
  735.  
  736.  
  737. ΓòÉΓòÉΓòÉ 3.20. PopSetDriver ΓòÉΓòÉΓòÉ
  738.  
  739.  
  740. PopSetDriver 
  741.  
  742. Sets to output device witch is one of the following: MMPM, DART or FILE. 
  743.  
  744.  
  745. Syntax 
  746.  
  747. call PopSetDriver device, buffer, sharing 
  748. or 
  749. call PopSetDriver device 
  750.  
  751.  
  752. Parameters 
  753.  
  754. device 
  755. Output device string: 'MMPM', 'DART' or 'FILE'. 
  756.  
  757. If output device is 'FILE' no other parametrs are accepted. File output 
  758. is always file 'MUSIC.RAW'. 
  759.  
  760. Default output driver is 'MMPM'. 
  761.  
  762. buffer 
  763. Output device buffer size in kilobytes. Integer beetween 1 to 63. 
  764. Default is 16. 
  765.  
  766. Recommended buffer size for DART 8kB and MMPM 16kB. 
  767.  
  768. sharing 
  769. Output device sharing. String witch is either 'EXCLUSIVE' or 'SHARED'. 
  770. Default is 'EXCLUSIVE'. 
  771.  
  772.  
  773. Return 
  774.  
  775. status 
  776. 0 = No error. 
  777. 5 = Illegal play mode (Paramters take effect when new module is loaded). 
  778.  
  779.  
  780. Since 
  781.  
  782. v1.00 
  783.  
  784.  
  785. ΓòÉΓòÉΓòÉ 3.21. PopSetLooping ΓòÉΓòÉΓòÉ
  786.  
  787.  
  788. PopSetLooping 
  789.  
  790. Allows the player to process looping commands embedded in the module. 
  791. This means that the player will play such songs forever.  Modules which 
  792. do not contain looping commands are unaffected.  The user must use 
  793. PopStop to end playing of a looping module. 
  794.  
  795.  
  796. Syntax 
  797.  
  798. call PopSetLooping state 
  799.  
  800.  
  801. Parameters 
  802.  
  803. state 
  804. String 'ON' or 'OFF'. Default value is 'OFF'. 
  805.  
  806.  
  807. Return 
  808.  
  809. nothing 
  810.  
  811.  
  812. Since 
  813.  
  814. v1.00 
  815.  
  816.  
  817. ΓòÉΓòÉΓòÉ 3.22. PopSetPriority ΓòÉΓòÉΓòÉ
  818.  
  819.  
  820. PopSetPriority 
  821.  
  822.  
  823. Syntax 
  824.  
  825. rc=PopSetPriority( scope, class, delta, id ) 
  826.  
  827.  
  828. Parameters 
  829.  
  830. Parameters are same as API function DosSetPriority. 
  831.  
  832. Propably you don't need this function because there is 
  833. now priority setting in both PopPlay() and PopPlayThread() 
  834. funtions. 
  835.  
  836.  
  837. Return 
  838.  
  839. rc 
  840. 0 = No error. 
  841. 6 = API function failed. 
  842.  
  843.  
  844. See also 
  845.  
  846. PopPlay, PopPlayThread 
  847.  
  848.  
  849. Since 
  850.  
  851. 0.90 
  852.  
  853.  
  854. ΓòÉΓòÉΓòÉ 3.23. PopSetSongPos ΓòÉΓòÉΓòÉ
  855.  
  856.  
  857. PopSetSongPos 
  858.  
  859. Set the song position 
  860.  
  861.  
  862. Syntax 
  863.  
  864. call PopSetSongPos pos 
  865.  
  866.  
  867. Parameters 
  868.  
  869. pos 
  870. Song position to set. Positive integer value. 
  871.  
  872.  
  873. Return 
  874.  
  875. nothing 
  876.  
  877.  
  878. See also 
  879.  
  880. PopGetSongPos, PopNextSongPos, PopPrevSongPos 
  881.  
  882.  
  883. Since 
  884.  
  885. v1.00 
  886.  
  887.  
  888. ΓòÉΓòÉΓòÉ 3.24. PopSetVolume ΓòÉΓòÉΓòÉ
  889.  
  890.  
  891. PopSetVolume 
  892.  
  893. Sets the new master volume.(without saving) 
  894.  
  895.  
  896. Syntax 
  897.  
  898. rc = PopSetVolume( volume ) 
  899.  
  900.  
  901. Parameters 
  902.  
  903. volume 
  904. Master volume from 0% to 100%. 
  905.  
  906.  
  907. Return 
  908.  
  909. rc 
  910. 0 = No error. 
  911. 6 = API function failed. 
  912.  
  913.  
  914. See also 
  915.  
  916. PopGetVolume 
  917.  
  918.  
  919. Since 
  920.  
  921. v0.97 
  922.  
  923.  
  924. ΓòÉΓòÉΓòÉ 3.25. PopSleep ΓòÉΓòÉΓòÉ
  925.  
  926.  
  927. PopSleep 
  928.  
  929. Gives timeslices to other processes. 
  930.  
  931.  
  932. Syntax 
  933.  
  934. rc = PopSleep( time_ms ) 
  935.  
  936.  
  937. Parameters 
  938.  
  939. time_ms 
  940. Time to sleep in milliseconds. 
  941.  
  942.  
  943. Return 
  944.  
  945. rc 
  946. 0 = No error. 
  947. 6 = API function failed. 
  948.  
  949.  
  950. Since 
  951.  
  952. v0.90 
  953.  
  954.  
  955. ΓòÉΓòÉΓòÉ 3.26. PopStatus ΓòÉΓòÉΓòÉ
  956.  
  957.  
  958. PopStatus 
  959.  
  960. Get current player status (during the play) 
  961.  
  962.  
  963. Syntax 
  964.  
  965. status=PopStatus() 
  966. or 
  967. status=PopStatus('TEXT') 
  968.  
  969.  
  970. Parameters 
  971.  
  972. 'TEXT' 
  973. Returns player state as string. 
  974.  
  975.  
  976. Return 
  977.  
  978. status 
  979. Current playing status (number). 
  980.           0=STOP 
  981.           1=PAUSE 
  982.           2=PLAY 
  983.           3=LOAD 
  984.  
  985.  Current playing status (text). 
  986.  status 
  987.           STOP 
  988.           PAUSE 
  989.           PLAY 
  990.           LOAD 
  991.  
  992.  
  993.  See also 
  994.  
  995.  PopPause, PopStop 
  996.  
  997.  
  998.  Since 
  999.  
  1000.  always 
  1001.  
  1002.  
  1003. ΓòÉΓòÉΓòÉ 3.27. PopStop ΓòÉΓòÉΓòÉ
  1004.  
  1005.  
  1006. PopStop 
  1007.  
  1008. Immediatly stop playing 
  1009.  
  1010.  
  1011. Syntax 
  1012.  
  1013. call PopStop 
  1014.  
  1015.  
  1016. Return 
  1017.  
  1018. nothing 
  1019.  
  1020.  
  1021. See also 
  1022.  
  1023. PopPlay, PopPlayThread, PopStatus 
  1024.  
  1025.  
  1026. Since 
  1027.  
  1028. always 
  1029.  
  1030.  
  1031. ΓòÉΓòÉΓòÉ 3.28. PopVersion ΓòÉΓòÉΓòÉ
  1032.  
  1033.  
  1034. PopVersion 
  1035.  
  1036. Get the DLL version string. 
  1037.  
  1038.  
  1039. Syntax 
  1040.  
  1041. ver = PopVersion() 
  1042.  
  1043.  
  1044. Return 
  1045.  
  1046. ver 
  1047. Version number string. 
  1048.  
  1049.  
  1050. See also 
  1051.  
  1052. PopInfo 
  1053.  
  1054.  
  1055. Since 
  1056.  
  1057. Always. 
  1058.  
  1059.  
  1060. ΓòÉΓòÉΓòÉ 4. Rexx example ΓòÉΓòÉΓòÉ
  1061.  
  1062.  
  1063. /* REXX TEST */ 
  1064. /* THIS IS ONLY AN EXAMPLE*/ 
  1065. /* DON'T EXPECT THAT THIS PROGRAM WORKS WITHOUT MODIFICATION */ 
  1066.  
  1067.  signal on HALT 
  1068.  signal on ERROR 
  1069.  
  1070.  parse arg dir 
  1071.  
  1072.  if dir='' then dir='.\' 
  1073.  
  1074.  call ModInit 
  1075.  call ModSetDriver 'DART',1,'SHARED' 
  1076.  call ModSetLooping 'OFF' 
  1077.  
  1078.  call SCls 
  1079.  call ModDspProduct 
  1080.  call ModDspWait 
  1081.  call ModReadDir dir, '*.*', f., n., t. 
  1082.  call SCls 
  1083.  call ModDspProduct 
  1084.  
  1085.  noabort=1 
  1086.  if f.0 == 0 then do 
  1087.   call ModDspCmdLineHelp 
  1088.   noabort=0 
  1089.  end 
  1090.  do while noabort 
  1091.  
  1092.   i = RANDOM(1, f.0, TIME('S')) 
  1093.  
  1094.   gl.file=f.i 
  1095.   gl.name=n.i 
  1096.   gl.volume = ModGetVolume() 
  1097.   gl.mix = 22050        /*Mixing speed*/ 
  1098.   gl.bits = 8          /*Bits per sample*/ 
  1099.   gl.channels = 2        /*Stereo*/ 
  1100.   gl.priority = 3 
  1101.   gl.rc = 0 
  1102.  
  1103.   call SCurState OFF 
  1104.   call SCls 
  1105.   call ModDspProduct 
  1106.   call ModDspSettings 
  1107.   call ModDspHelp 
  1108.  
  1109.   call ModInitWav 4     /* now your module have four channels more*/ 
  1110.  
  1111.   /*add our test effects to the memory*/ 
  1112.   handle00 = ModAddWav("C:\MMOS2\SOUNDS\DRUMROLL.WAV") 
  1113.   handle01 = ModAddWav("C:\MMOS2\SOUNDS\BEEOONG.WAV") 
  1114.   handle02 = ModAddWav("C:\MMOS2\SOUNDS\BELLS.WAV") 
  1115.   handle03 = ModAddWav("C:\MMOS2\SOUNDS\BOING.WAV") 
  1116.   handle04 = ModAddWav("C:\MMOS2\SOUNDS\BOO.WAV") 
  1117.   handle05 = ModAddWav("C:\MMOS2\SOUNDS\BWAAANG.WAV") 
  1118.   handle06 = ModAddWav("C:\MMOS2\SOUNDS\BWEEEP.WAV") 
  1119.   handle07 = ModAddWav("C:\MMOS2\SOUNDS\CUCKOO.WAV") 
  1120.   handle08 = ModAddWav("C:\MMOS2\SOUNDS\DOINK.WAV") 
  1121.   handle09 = ModAddWav("C:\MMOS2\SOUNDS\DOORCLS.WAV") 
  1122.  
  1123.   /* LET'S PLAY SOME MUSIC */ 
  1124.   s=ModPlayThread( gl.file, gl.mix, gl.bits, gl.channels, gl.priority ) 
  1125.  
  1126.   noexit=1 
  1127.   if s>0 then noexit=0 
  1128.   do while (noexit) 
  1129.    key=ModGetKey(0) /*Undocumented function, please don't use this in your 
  1130. program*/ 
  1131.  
  1132.    if key\==0 then do 
  1133.  
  1134.     /* VOLUME UP - '+' */ 
  1135.     if key == 43 then do 
  1136.      gl.volume=gl.volume+4; 
  1137.      if gl.volume>100 then gl.volume=100 
  1138.      call ModSetVolume gl.volume 
  1139.     end 
  1140.  
  1141.     /* VOLUME DOWN - '-' */ 
  1142.     if key == 45 then do 
  1143.      gl.volume=gl.volume-4; 
  1144.      if gl.volume<0 then gl.volume=0 
  1145.      call ModSetVolume gl.volume 
  1146.     end 
  1147.  
  1148.     /* PAUSE/PLAY - 'SPACE' */ 
  1149.     if key == 32 then do 
  1150.      call ModPause 
  1151.     end 
  1152.  
  1153.     if key == 78 then do 
  1154.      call ModNextSongPos 
  1155.     end 
  1156.  
  1157.     if key == 80 then do 
  1158.      call ModPrevSongPos 
  1159.     end 
  1160.  
  1161.     if key == 83 then do 
  1162.      call ModSetSongPos(0) 
  1163.     end 
  1164.  
  1165.     /* PLAY VOICE- '0' */ 
  1166.     if (key == 48) then do 
  1167.      call ModPlayWav handle01, 0, 3000, 255, 127 
  1168.      call ModPlayWav handle02, 1, 7000, 255, 127 
  1169.      call ModPlayWav handle03, 2, 7100, 255, 255 
  1170.      call ModPlayWav handle04, 3, 12000, 255, 0 
  1171.     end 
  1172.  
  1173.     /* PLAY VOICE- '1' */ 
  1174.     if (key == 49) then do 
  1175.      call ModPlayWav handle05, 0, 11025, 255, 255 
  1176.      call ModPlayWav handle04, 1, 10100, 255, 0 
  1177.      call ModPlayWav handle05, 3, 11025, 255, 255 
  1178.      call ModPlayWav handle06, 4, 19100, 255, 0 
  1179.     end 
  1180.  
  1181.     /* PLAY VOICE - '2' */ 
  1182.     if (key == 50) then do 
  1183.      call ModPlayWav handle07, 0, 19025, 255, 127 
  1184.      call ModPlayWav handle08, 1, 10025, 255, 0 
  1185.      call ModPlayWav handle09, 3, 11025, 255, 255 
  1186.     end 
  1187.  
  1188.     /* PLAY VOICE - '3' */ 
  1189.     if (key == 51) then do 
  1190.      call ModPlayWav handle09, 0, 11025, 255, 255 
  1191.      call ModPlayWav handle09, 1, 11425, 255, 0 
  1192.     end 
  1193.  
  1194.     /* SET SONG POSITION TO END - 'E' */ 
  1195.     if (key == 69) then do 
  1196.      call ModSetSongPos ModMaxSongPos()-1 
  1197.     end 
  1198.  
  1199.     /*EXIT - CHECK ESC KEY*/ 
  1200.     if key == 27 then do 
  1201.      noexit=0 
  1202.      noabort=0 
  1203.     end 
  1204.  
  1205.     /*NEXT SONG - ENTER*/ 
  1206.     if key == 13 then noexit=0 
  1207.  
  1208.    end 
  1209.  
  1210.    status = ModStatus('TEXT') 
  1211.    if status == 'STOP' then noexit=0 
  1212.  
  1213.    /* UPDATE DISPLAY */ 
  1214.    call ModDspSongInfo 
  1215.    call ModDspInfo status 
  1216.  
  1217.    call ModSleep 256         /* 256ms */ 
  1218.   end 
  1219.  
  1220.   call ModStop 
  1221.   do while ModStatus() \= 0 
  1222.   end 
  1223.  
  1224.  end 
  1225.  
  1226.  call ModDone 
  1227.  
  1228.  exit 
  1229.  /*** END MAIN ***/ 
  1230.  
  1231. HALT: 
  1232. ERROR: 
  1233.  call ModStop 
  1234.  do while ModStatus() \= 0 
  1235.  end 
  1236.  call ModDone 
  1237.  exit 
  1238.  
  1239. ModInit:procedure 
  1240.  
  1241.  call RxFuncAdd 'SCurState'    , 'RexxUtil', 'SysCurState' 
  1242.  call RxFuncAdd 'SCurPos'     , 'RexxUtil', 'SysCurPos' 
  1243.  call RxFuncAdd 'SCls'      , 'RexxUtil', 'SysCls' 
  1244.  
  1245.  call RxFuncAdd 'ModVersion'   , 'POPPLAY', 'PopVersion' 
  1246.  call RxFuncAdd 'ModInfo'     , 'POPPLAY', 'PopInfo' 
  1247.  call RxFuncAdd 'ModPlay'     , 'POPPLAY', 'PopPlay' 
  1248.  call RxFuncAdd 'ModPlayThread'  , 'POPPLAY', 'PopPlayThread' 
  1249.  call RxFuncAdd 'ModStop'     , 'POPPLAY', 'PopStop' 
  1250.  call RxFuncAdd 'ModPause'    , 'POPPLAY', 'PopPause' 
  1251.  call RxFuncAdd 'ModStatus'    , 'POPPLAY', 'PopStatus' 
  1252.  call RxFuncAdd 'ModSetVolume'  , 'POPPLAY', 'PopSetVolume' 
  1253.  call RxFuncAdd 'ModGetVolume'  , 'POPPLAY', 'PopGetVolume' 
  1254.  call RxFuncAdd 'ModSetPriority' , 'POPPLAY', 'PopSetPriority' 
  1255.  call RxFuncAdd 'ModReadDir'   , 'POPPLAY', 'PopReadDir' 
  1256.  call RxFuncAdd 'ModSleep'    , 'POPPLAY', 'PopSleep' 
  1257.  call RxFuncAdd 'ModGetKey'    , 'POPPLAY', 'PopGetKey' 
  1258.  call RxFuncAdd 'ModGetSongPos'  , 'POPPLAY', 'PopGetSongPos' 
  1259.  call RxFuncAdd 'ModGetPatPos'  , 'POPPLAY', 'PopGetPatPos' 
  1260.  call RxFuncAdd 'ModGetSongSpeed', 'POPPLAY', 'PopGetSongSpeed' 
  1261.  call RxFuncAdd 'ModGetSongBPM'  , 'POPPLAY', 'PopGetSongBPM' 
  1262.  call RxFuncAdd 'ModSetLooping'  , 'POPPLAY', 'PopSetLooping' 
  1263.  call RxFuncAdd 'ModInitWav'   , 'POPPLAY', ' PopInitWav' 
  1264.  call RxFuncAdd 'ModAddWav'    , 'POPPLAY', 'PopAddWav' 
  1265.  call RxFuncAdd 'ModPlayWav'   , 'POPPLAY', 'PopPlayWav' 
  1266.  call RxFuncAdd 'ModSetSongPos'  , 'POPPLAY', 'PopSetSongPos' 
  1267.  call RxFuncAdd 'ModNextSongPos' , 'POPPLAY', 'PopNextSongPos' 
  1268.  call RxFuncAdd 'ModPrevSongPos' , 'POPPLAY', 'PopPrevSongPos' 
  1269.  call RxFuncAdd 'ModMaxSongPos'  , 'POPPLAY', 'PopMaxSongPos' 
  1270.  call RxFuncAdd 'ModGetChannels' , 'POPPLAY', 'PopGetChannels' 
  1271.  call RxFuncAdd 'ModSetDriver'  , 'POPPLAY', 'PopSetDriver' 
  1272. return 
  1273.  
  1274. ModDone:procedure 
  1275. return 
  1276.  
  1277. ModDspWait:procedure 
  1278.  x= 10 
  1279.  y= 10 
  1280.  call ModDsp x,y+0,'Wait. Reading directory...' 
  1281. return 
  1282.  
  1283. ModDspSettings:procedure expose gl. 
  1284.  x=5 
  1285.  y=4 
  1286.  call ModDsp x,y+0,"Module file    : "gl.file 
  1287.  call ModDsp x,y+1,"Module name    : "gl.name 
  1288.  call ModDsp x,y+2,"Mixing rate    : "gl.mix 
  1289.  call ModDsp x,y+3,"Bits per sample  : "gl.bits 
  1290.  call ModDsp x,y+4,"Channels     : "gl.channels 
  1291.  call ModDsp x,y+5,"Priority     : "gl.priority 
  1292.  call ModDsp x,y+6,"Error       : "gl.rc 
  1293. return 
  1294.  
  1295. ModDspProduct:procedure 
  1296.  x= 1 
  1297.  y= 1 
  1298.  call ModDsp x,y+0,ModInfo()  " - Version "ModVersion() 
  1299.  call ModDsp x,y+1,"Random play demo" 
  1300. return 
  1301.  
  1302. ModDspInfo:procedure 
  1303.  parse arg line 
  1304.  x= 5 
  1305.  y= 23 
  1306.  call ModDsp x,y,line 
  1307. return 
  1308.  
  1309. ModDspSongInfo:procedure expose gl. 
  1310.  x= 5 
  1311.  y= 13 
  1312.  call ModDsp x,y+0,'Channels     : 'ModGetChannels()"  " 
  1313.  call ModDsp x,y+1,'Song position   : 'ModGetSongPos()"  " 
  1314.  call ModDsp x,y+2,'Max song position: 'ModMaxSongPos()"  " 
  1315.  call ModDsp x,y+3,'Pattern position : 'ModGetPatPos()"  " 
  1316.  call ModDsp x,y+4,'Song speed    : 'ModGetSongSpeed()"  " 
  1317.  call ModDsp x,y+5,'Beats per minute : 'ModGetSongBPM()"  " 
  1318.  call ModDsp x,y+8,'Volume      : 'gl.volume'%  '"  " 
  1319. return 
  1320.  
  1321. ModDspHelp:procedure 
  1322.  x=40 
  1323.  y=7 
  1324.  call ModDsp x,y+00, "        HELP         " 
  1325.  call ModDsp x,y+01, "======keys=are=casesensitive!======" 
  1326.  call ModDsp x,y+03, "  <+>    Volume up.       " 
  1327.  call ModDsp x,y+04, "  <->    Volume down.      " 
  1328.  call ModDsp x,y+05, "<SPACE>   Pause/Play.       " 
  1329.  call ModDsp x,y+06, " <ESC>    Quit.          " 
  1330.  call ModDsp x,y+08, "<ENTER>   Jump to next song.   " 
  1331.  call ModDsp x,y+09, "  <P>    Previous song position." 
  1332.  call ModDsp x,y+10, "  <N>    Next song position.   " 
  1333.  call ModDsp x,y+11, "  <S>    Set position 0.     " 
  1334.  call ModDsp x,y+12, "<0...9>   Wav sound effects.   " 
  1335. return 
  1336.  
  1337. ModDsp:procedure 
  1338.  parse arg x,y,text 
  1339.  call SCurPos y, x 
  1340.  call charout ,text 
  1341. return 
  1342.  
  1343. ModDspCmdLinehelp:procedure 
  1344.  'CLS' 
  1345.  x=1 
  1346.  y=1 
  1347.  call ModDspProduct 
  1348.  call ModDsp x,y+03, "Usage: mod [dircetory]" 
  1349.  call ModDsp x,y+06, "NOTICE!" 
  1350.  call ModDsp x,y+08, "This demo uses following settins:" 
  1351.  call ModDsp x,y+09, "  -mixing speed 22kHz" 
  1352.  call ModDsp x,y+10, "  -8 bits/sample" 
  1353.  call ModDsp x,y+11, "  -2 channels ie. stereo" 
  1354.  call ModDsp x,y+12, "  -Audio driver DART" 
  1355.  call ModDsp x,y+13, "  -uses default mmp/2 soundeffects from C:\MMOS2\SOUNDS" 
  1356.  call ModDsp x,y+15, "If these settings don't match for you, checkout the Rexx 
  1357. source!" 
  1358.  say 
  1359. return 
  1360.