Advertisement
Testaware

AmpMaster API

Aug 30th, 2017
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.40 KB | None | 0 0
  1. ***********************************************************************
  2. AmpMaster API :: AmpMasterLibrary v1.17.9.3 13:53:54 (x86)
  3. ***********************************************************************
  4.  
  5. PrototypeC pAmp_Close()
  6. PrototypeC pAmp_CountAmpFormatsAll()
  7. PrototypeC pAmp_CountAmpPlayersAll()
  8. PrototypeC pAmp_CountSubSongs(*File.p-Ascii)
  9. PrototypeC pAmp_Free()
  10. PrototypeC pAmp_GetAmpFormatsStrAll()
  11. PrototypeC pAmp_GetAmpInDllsStrAll(*File.p-Ascii)
  12. PrototypeC pAmp_GetAmpInDllStr(*File.p-Ascii)
  13. PrototypeC pAmp_GetAmpInFormatStr(*InLib.p-Ascii)
  14. PrototypeC pAmp_GetError()
  15. PrototypeC pAmp_GetErrorStr(Error.i)
  16. PrototypeC pAmp_GetFileInfo(*File.p-Ascii, *Title, *Length)
  17. PrototypeC pAmp_GetInFlags(*InLib.p-Ascii)
  18. PrototypeC pAmp_GetInFormatStr()
  19. PrototypeC pAmp_GetInInfoStr()
  20. PrototypeC pAmp_GetOutInfoStr()
  21. PrototypeC pAmp_GetPercent()
  22. PrototypeC pAmp_GetPlayTime()
  23. PrototypeC pAmp_GetStopTime()
  24. PrototypeC pAmp_GetSubSong(*File.p-Ascii)
  25. PrototypeC pAmp_InAbout()
  26. PrototypeC pAmp_InConfig()
  27. PrototypeC pAmp_InfoBox(*File.p-Ascii)
  28. PrototypeC pAmp_Init()
  29. PrototypeC pAmp_MusicBox(*File.p-Ascii, Flags.i=1)
  30. PrototypeC pAmp_MusicGetLength(Flags.i=0)
  31. PrototypeC pAmp_MusicGetOutPosition()
  32. PrototypeC pAmp_MusicGetPosition()
  33. PrototypeC pAmp_MusicGetTitleStr()
  34. PrototypeC pAmp_MusicIsPlaying()
  35. PrototypeC pAmp_MusicPause(Pause.i)
  36. PrototypeC pAmp_MusicPlay(*File.p-Ascii)
  37. PrototypeC pAmp_MusicSetPan(Pan.i)
  38. PrototypeC pAmp_MusicSetPosition(Milliseconds.i)
  39. PrototypeC pAmp_MusicSetVolume(Volume.i)
  40. PrototypeC pAmp_MusicStop()
  41. PrototypeC pAmp_Open()
  42. PrototypeC pAmp_OutAbout()
  43. PrototypeC pAmp_OutConfig()
  44. PrototypeC pAmp_Play(*File.p-Ascii, Volume.i=255)
  45. PrototypeC pAmp_QuickPlay(*File.p-Ascii, *Path.p-Ascii)
  46. PrototypeC pAmp_SetAmpPath(*Path.p-Ascii)
  47. PrototypeC pAmp_SetDefaultLength(Milliseconds.i=0)
  48. PrototypeC pAmp_SetInDll(*InLib.p-Ascii)
  49. PrototypeC pAmp_SetInPath(*Path.p-Ascii)
  50. PrototypeC pAmp_SetLength(Milliseconds.i)
  51. PrototypeC pAmp_SetOutDll(*OutLib.p-Ascii)
  52. PrototypeC pAmp_SetOutPath(*Path.p-Ascii)
  53. PrototypeC pAmp_SetSubSong(*File.p-Ascii, SubSong.i)
  54. PrototypeC pAmp_SetWindow(*Window)
  55. PrototypeC pAmp_VersionStr(Flags.i=0)
  56.  
  57. ***********************************************************************
  58. Amp_Close()
  59. -----------------------------------------------------------------------
  60. Stop current playing song and close IN_DLL and OUT_DLL
  61.  
  62. ***********************************************************************
  63. INT = Amp_CountAmpFormatsAll()
  64. -----------------------------------------------------------------------
  65. Calculates all supported formats (file-extensions)
  66. e.g. *.MOD;*.WAV;*.AVI;*.PNG...
  67.  
  68. Return Code
  69. Number of intern supported extensions
  70.  
  71. ***********************************************************************
  72. INT = Amp_CountAmpPlayersAll()
  73. -----------------------------------------------------------------------
  74. Calculates all supported IN_DLL
  75.  
  76. Return Code
  77. Number of intern supported IN_DLL (AmpLibs\)
  78.  
  79. ***********************************************************************
  80. INT = Amp_CountSubSongs(*File.p-Ascii)
  81. -----------------------------------------------------------------------
  82. Calculates number of subsongs in file
  83.  
  84. Parameters
  85. *File = Pointer to song-filename
  86.  
  87. Return Code
  88. Number of subsongs
  89.  
  90. NOTE:
  91. Find out the number of subsongs from format *.sid;*.mdat;*.tfm;*.tfx;*.nsf;*.gbs;*.fred
  92. You must call this function before play subsongs, AmpMaster set the songnumber in file!
  93. While *.fred is hard to get correct songnumber, even old players gets none or different
  94. numbers, so this format returns always 15 subsongs.
  95.  
  96. ***********************************************************************
  97. Amp_Free()
  98. -----------------------------------------------------------------------
  99. Stop current playing song and close IN_DLL and OUT_DLL and frees all
  100. intern structures. Use this if AmpMaster no longer needed (shut down).
  101.  
  102. ***********************************************************************
  103. *PTR = Amp_GetAmpFormatsStrAll()
  104. -----------------------------------------------------------------------
  105. Calculates all supported formats (extensions) supported by AmpMaster.
  106.  
  107. Return Code
  108. Pointer to AscII String. Formats separated by ";*." in sorted order
  109.  
  110. ***********************************************************************
  111. *PTR = Amp_GetAmpInDllsStrAll(*File.p-Ascii)
  112. -----------------------------------------------------------------------
  113. Generates sorted string of all predefined IN_DLLs used by extension
  114.  
  115. Parameters
  116. *File = Pointer to song-filename
  117.  
  118. Return Code
  119. Pointer to AscII String. Libs separated by ";" in sorted order
  120.  
  121. ***********************************************************************
  122. *PTR = Amp_GetAmpInDllStr(*File.p-Ascii)
  123. -----------------------------------------------------------------------
  124. Get the default IN_DLL of *File-format
  125.  
  126. Parameters
  127. *File = Pointer to song-filename
  128.  
  129. Return Code
  130. Pointer to default IN_DLL of fileformat
  131.  
  132. ***********************************************************************
  133. *PTR = Amp_GetAmpInFormatStr(*InLib.p-Ascii)
  134. -----------------------------------------------------------------------
  135. Get intern supported formats by given IN_DLL *InLib only
  136.  
  137. Parameters
  138. *InLib = Pointer to IN_DLL (eg. AmpLibs\in_sk00l.dll)
  139.  
  140. Return Code
  141. Pointer to AscII String. Formats separated by ";*." in sorted order
  142.  
  143. ***********************************************************************
  144. INT = Amp_GetError()
  145. -----------------------------------------------------------------------
  146. Get the last errorcode
  147.  
  148. Return Code
  149. #EAMP_OK = 0 ;* all ok, no error
  150. #EAMP_NO_OUTDLL = -1 ;* out_dll is no winamp-dll
  151. #EAMP_OPEN_OUTDLL = -2 ;* can't open out_dll
  152. #EAMP_NO_INDLL = -3 ;* in_dll is no winamp-dll
  153. #EAMP_OPEN_INDLL = -4 ;* can't open in_dll
  154. #EAMP_OPEN_FILE = -5 ;* can't replay file (not supported)
  155. #EAMP_UNKOWN_FORMAT = -6 ;* none of defined (supported) formats
  156. #EAMP_INITIALIZE = -7 ;* in_/out_dll not initialized
  157. #EAMP_NO_MASTER = -8 ;* obsolete: cannot open ampmaster.dll
  158.  
  159. ***********************************************************************
  160. *PTR = Amp_GetErrorStr(Error.i)
  161. -----------------------------------------------------------------------
  162. Get the error-string of Error
  163.  
  164. Parameters
  165. Errorcode
  166.  
  167. Return Code
  168. Pointer to AscII Error-String.
  169.  
  170. ***********************************************************************
  171. Amp_GetFileInfo(*File.p-Ascii, *Title, *Length)
  172. -----------------------------------------------------------------------
  173. Get information of *File
  174.  
  175. Return Code
  176. Error or NULL all OK
  177.  
  178. Parameters
  179. *File = Pointer to Filename or 0 -> current playing file
  180. *Title = Pointer to Buffer{2048} for real title of song
  181. *Length = Pointer to Integer for time in ms
  182.  
  183. ***********************************************************************
  184. INT = Amp_GetInFlags(*InLib.p-Ascii)
  185. -----------------------------------------------------------------------
  186. Get the intern flags-combination of supported IN_DLL *InLib only
  187.  
  188. Parameters
  189. *InLib = Pointer to IN_DLL (eg. AmpLibs\in_pureamp.dll)
  190.  
  191. Return Code
  192. #FAMP_DEFAULT #Null ;* Nothing
  193. #FAMP_EX_INI 1<<0 ;* Needs ini-file (don't delete it)
  194. #FAMP_EX_LIBS 1<<1 ;* Needs extern libs/drivers (must set path to AmpLibs\)
  195. #FAMP_EX_SFX 1<<2 ;* Needs extern sfx-file (must set path to song eg. miniusf...)
  196. #FAMP_NB_SONGS 1<<3 ;* Plays subsongs (tfmx, sid, nsf, gbs, fred...)
  197. #FAMP_NO_PAUSE 1<<4 ;* Cannot paused
  198. #FAMP_NO_RECORD 1<<5 ;* Cannot record waves
  199. #FAMP_NO_SEEK 1<<6 ;* Cannot time-seek
  200. #FAMP_NO_VOLUME 1<<7 ;* Cannot control volume (ffviii)
  201. #FAMP_NO_PAN 1<<8 ;* Cannot control pan (bass)
  202. #FAMP_NO_OUTPUT 1<<9 ;* No use of out_dll (in_dll own replayer -> eg. in_bass.dll)
  203.  
  204. ***********************************************************************
  205. *PTR = Amp_GetInFormatStr()
  206. -----------------------------------------------------------------------
  207. Get the IN_DLL supported formats, thats is mostly different from the intern
  208. defined AmpMaster formats. For example in_xmp.dll will return 32 extensions only,
  209. but detect and play 136 formats.
  210.  
  211. Return Code
  212. Pointer to AscII Tracker-String of IN_DLL only in sorted order
  213.  
  214. ***********************************************************************
  215. *PTR = Amp_GetInInfoStr()
  216. -----------------------------------------------------------------------
  217. Get the IN_DLL info-string
  218.  
  219. Return Code
  220. Pointer to AscII Info-String of IN_DLL
  221.  
  222. ***********************************************************************
  223. *PTR = Amp_GetOutInfoStr()
  224. -----------------------------------------------------------------------
  225. Get the OUT_DLL info-string
  226.  
  227. Return Code
  228. Pointer to AscII Info-String of OUT_DLL
  229.  
  230. ***********************************************************************
  231. INT = Amp_GetPercent()
  232. -----------------------------------------------------------------------
  233. Get current position of playing file in percent (0-100)
  234.  
  235. Return Code
  236. Time in percent
  237.  
  238. ***********************************************************************
  239. INT = Amp_GetPlayTime()
  240. -----------------------------------------------------------------------
  241. Get current position of playing file in milliseconds
  242.  
  243. Return Code
  244. Time in milliseconds
  245.  
  246. ***********************************************************************
  247. INT = Amp_GetStopTime()
  248. -----------------------------------------------------------------------
  249. Get rest of playtime until stop
  250.  
  251. Return Code
  252. Resttime in milliseconds
  253.  
  254. ***********************************************************************
  255. INT = Amp_GetSubSong(*File.p-Ascii)
  256. -----------------------------------------------------------------------
  257. Get actual subsong of *File
  258.  
  259. Return Code
  260. Actual subsong which would played
  261.  
  262.  
  263. ***********************************************************************
  264. INT = Amp_InAbout()
  265. -----------------------------------------------------------------------
  266. Opens a info-request about current active IN_DLL
  267.  
  268. Return Code
  269. Error or Null
  270.  
  271. ***********************************************************************
  272. INT = Amp_InConfig()
  273. -----------------------------------------------------------------------
  274. Opens a config-dialogue to setup actual IN_DLL, changes will be active
  275. when its reloaded.
  276.  
  277. Return Code
  278. Error or Null
  279.  
  280. NOTE:
  281. Not all IN_DLL has a configuration and when, every one got its own setup.
  282. AmpMaster doesn't change the individual configuration.
  283.  
  284. ***********************************************************************
  285. INT = Amp_InfoBox(*File.p-Ascii)
  286. -----------------------------------------------------------------------
  287. Opens a file-dialogue pretent by its format and default IN_DLL
  288.  
  289. Return Code
  290. Error or Null
  291.  
  292. ***********************************************************************
  293. Amp_Init()
  294. -----------------------------------------------------------------------
  295. Frees all intern datas, setup internals to its default
  296.  
  297. NOTE:
  298. Call this function allways at first when initialize AmpMaster
  299.  
  300. ***********************************************************************
  301. INT = Amp_MusicBox(*File.p-Ascii, Flags.i=1)
  302. -----------------------------------------------------------------------
  303. Opens the intern AmpPlayer GUI for easy replay
  304.  
  305. Parameters
  306. *File = Pointer to song-name to play imediatly, or NULL
  307. Flags = 1 -> Default, saves preferences on quit, multiple fileselect
  308. 0 -> Singe file-replay, no prefs will be saved
  309.  
  310. Return Code
  311. Error or NULL
  312.  
  313. NOTE:
  314. Its the eseast way to choose and play a file, all functions supported!
  315. See the Includes\i_amp_player.pbi for (bad) example.
  316.  
  317. ***********************************************************************
  318. INT = Amp_MusicGetLength(Flags.i=0)
  319. -----------------------------------------------------------------------
  320. Get the playlength of current playing file
  321.  
  322. Parameters
  323. Flags = 0 -> Return the time generated by IN_DLL
  324. 1 -> Return the time generated by FileInfo
  325.  
  326. Return Code
  327. Playlength in milliseconds or <= NULL
  328.  
  329. NOTE:
  330. Not all IN_DLLs generates real playlength, some like in_sid2.dll
  331. return number of subsongs, others return -1 downto -1000, you can
  332. check the individual Flags for special support!
  333.  
  334. ***********************************************************************
  335. INT = Amp_MusicGetOutPosition()
  336. -----------------------------------------------------------------------
  337. Get the current record-position in milliseconds
  338.  
  339. Return Code
  340. Record-Position in milliseconds
  341.  
  342. NOTE:
  343. Use this only if a diskwriter is used as OUT_DLL (eg. out_disk.dll)
  344.  
  345. ***********************************************************************
  346. INT = Amp_MusicGetPosition()
  347. -----------------------------------------------------------------------
  348. Get the current play-position in milliseconds
  349.  
  350. Return Code
  351. Play-Position in milliseconds
  352.  
  353. NOTE:
  354. Not all return real position. Better use Amp_GetPlayTime(), cause it
  355. returns intern AmpMaster play-position exacttly, regardles of format.
  356.  
  357. ***********************************************************************
  358. *PTR = Amp_MusicGetTitleStr()
  359. -----------------------------------------------------------------------
  360. Get the song-intern name of current played file
  361.  
  362. Return Code
  363. Pointer to AscII Title-String or empty
  364.  
  365. NOTE:
  366. Not all songs included a title-string as song-name, it depends by the
  367. user self to setup the individual tags (MP3, MOD...)
  368.  
  369. ***********************************************************************
  370. INT = Amp_MusicIsPlaying()
  371. -----------------------------------------------------------------------
  372. Test if a song is currently playing
  373.  
  374. Return Code
  375. True = Playing
  376. False = Stopped
  377.  
  378. ***********************************************************************
  379. INT = Amp_MusicPause(Pause.i)
  380. -----------------------------------------------------------------------
  381. Pause current playing song
  382.  
  383. Parameters
  384. True = Song paused
  385. False = Song unpaused
  386.  
  387. Return Code
  388. 1 = Song paused
  389. 0 = Song unpaused
  390.  
  391. ***********************************************************************
  392. INT = Amp_MusicPlay(*File.p-Ascii)
  393. -----------------------------------------------------------------------
  394. Plays the *File
  395.  
  396. Parameters
  397. *File = Pointer to full Path + Filename
  398.  
  399. Return Code
  400. Error or #EAMP_OK (0)
  401.  
  402. NOTE:
  403. If no IN_DLL / OUT_DLL is set, AmpMaster try to open by default setup.
  404. Set of volume and pan will be used, so no need to do it again.
  405.  
  406. ***********************************************************************
  407. INT = Amp_MusicSetPan(Pan.i)
  408. -----------------------------------------------------------------------
  409. Set the pan-level for left & right speaker
  410.  
  411. Parameters
  412. Pan = -127 -> full left
  413. 0 -> center
  414. 127 -> full right
  415.  
  416. Return Code
  417. Real pan-level
  418.  
  419. ***********************************************************************
  420. INT = Amp_MusicSetPosition(Milliseconds.i)
  421. -----------------------------------------------------------------------
  422. Set the current playing song-position in milliseconds
  423.  
  424. Parameters
  425. Milliseconds = Position in milliseconds
  426.  
  427. Return Code
  428. Real position in milliseconds
  429.  
  430. ***********************************************************************
  431. INT = Amp_MusicSetVolume(Volume.i)
  432. -----------------------------------------------------------------------
  433. Set the volume-level for left & right speaker
  434.  
  435. Parameters
  436. Volume = 0 (silence) ... maximal 255 (full loudness)
  437.  
  438. Return Code
  439. Real volume-level
  440.  
  441. ***********************************************************************
  442. Amp_MusicStop()
  443. -----------------------------------------------------------------------
  444. Stops the current playing song
  445.  
  446. ***********************************************************************
  447. INT = Amp_Open()
  448. -----------------------------------------------------------------------
  449. Opens the given IN_DLL & OUT_DLL, this is to call before playing a
  450. song.
  451.  
  452. Return Code
  453. Error or #EAMP_OK (0)
  454.  
  455. ***********************************************************************
  456. INT = Amp_OutAbout()
  457. -----------------------------------------------------------------------
  458. Opens a info-request about current active OUT_DLL
  459.  
  460. Return Code
  461. Error or #EAMP_OK (0)
  462.  
  463. ***********************************************************************
  464. INT = Amp_OutConfig()
  465. -----------------------------------------------------------------------
  466. Opens a config-dialogue to setup actual OUT_DLL, changes will be active
  467. when its reloaded.
  468.  
  469. Return Code
  470. Error or #EAMP_OK (0)
  471.  
  472. NOTE:
  473. Not all OUT_DLL has a configuration and when, every one got its own setup.
  474. AmpMaster doesn't change the individual configuration.
  475.  
  476. ***********************************************************************
  477. INT = Amp_Play(*File.p-Ascii, Volume.i=255)
  478. -----------------------------------------------------------------------
  479. Replays a *File and must stopp manually
  480.  
  481. Parameters
  482. *File = Pointer to full Path + Filename
  483. Volume = Volume 0..255
  484.  
  485. Return Code
  486. Error or #EAMP_OK (0)
  487.  
  488. NOTE:
  489. Easy way to replay a song in own programms
  490.  
  491. ***********************************************************************
  492. INT = Amp_QuickPlay(*File.p-Ascii, *Path.p-Ascii)
  493. -----------------------------------------------------------------------
  494. Opens a requester with informations about plaing file and IN_DLL
  495.  
  496. Parameters
  497. *File = Pointer to full Path + Filename
  498. *Path = Pointer to path of AmpLibs\
  499.  
  500. Return Code
  501. Error or #EAMP_OK (0)
  502.  
  503. NOTE:
  504. Implemented for a quick play and test of song-file and IN_DLL
  505.  
  506. ***********************************************************************
  507. Amp_SetAmpPath(*Path.p-Ascii)
  508. -----------------------------------------------------------------------
  509. Set the path to IN_DLLs / OUT_DLLs, all access will be to the given
  510. path.
  511.  
  512. Parameters
  513. *Path = Pointer to full path-name of AmpLibs
  514. if *Path = 0 AmpMaster reset to DEFAULT_PATH
  515.  
  516. ***********************************************************************
  517. Amp_SetDefaultLength(Milliseconds.i=0)
  518. -----------------------------------------------------------------------
  519. Set the default play-length in milliseconds
  520.  
  521. Parameters
  522. Milliseconds = Length in milliseconds
  523.  
  524. NOTE:
  525. If milliseconds <= 0 AmpMaster set DEFAULT_LENGTH
  526.  
  527. ***********************************************************************
  528. Amp_SetInDll(*InLib.p-Ascii)
  529. -----------------------------------------------------------------------
  530. Set IN_DLL to play a song-file
  531.  
  532. Parameters
  533. *InLib = Pointer to full path + filename of IN_DLL
  534.  
  535. ***********************************************************************
  536. Amp_SetInPath(*Path.p-Ascii)
  537. -----------------------------------------------------------------------
  538. Set path of IN_DLLs
  539.  
  540. Parameters
  541. *Path = Pointer to path of stored IN_DLLs
  542.  
  543. ***********************************************************************
  544. Amp_SetLength(Milliseconds.i)
  545. -----------------------------------------------------------------------
  546. Set play-length of current playing sound-file
  547.  
  548. Parameters
  549. Milliseconds = Length of sound-file in milliseconds
  550.  
  551. ***********************************************************************
  552. Amp_SetOutDll(*OutLib.p-Ascii)
  553. -----------------------------------------------------------------------
  554. Set OUT_DLL to play a song-file
  555.  
  556. Parameters
  557. *OutLib = Pointer to full path + filename of OUT_DLL
  558.  
  559. ***********************************************************************
  560. Amp_SetOutPath(*Path.p-Ascii)
  561. -----------------------------------------------------------------------
  562. Set path of OUT_DLLs
  563.  
  564. Parameters
  565. *Path = Pointer to path of stored OUT_DLLs
  566.  
  567. ***********************************************************************
  568. INT = Amp_SetSubSong(*File.p-Ascii, SubSong.i)
  569. -----------------------------------------------------------------------
  570. Set the subsong in file *.sid;*.mdat;*.tfm;*.tfx;*.nsf;*.gbs;*.fred
  571.  
  572. Parameters
  573. *File = Pointer to full path + filename
  574. SubSong = Number of subsong
  575.  
  576. Return Code
  577. Error or #EAMP_OK (0)
  578.  
  579. NOTE:
  580. Remeber always to call first Amp_CountSubSongs(), cause it will generate
  581. special tags in some formats.
  582.  
  583. ***********************************************************************
  584. Amp_SetWindow(*Window)
  585. -----------------------------------------------------------------------
  586. Set the parent-window for IN_DLLs / OUT_DLLs
  587.  
  588. Parameters
  589. *Window = Handle to parent-window (calling application)
  590. Default ist foreground-window (desktop)
  591.  
  592. ***********************************************************************
  593. *PTR = Amp_VersionStr(Flags.i=0)
  594. -----------------------------------------------------------------------
  595. Get the pointer to version-string of AmpMaster
  596.  
  597. Parameters
  598. Flags = 0 -> short version-string
  599. 1 -> long version-string (build time)
  600.  
  601. Return Code
  602. Pointer to AscII Version-String of AmpMaster_x86.dll
  603.  
  604. ***********************************************************************
  605. end of file - I don't like writing docs, sorry for my bad english
  606. ***********************************************************************
  607. Sunday, 3. September 2017
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement