/Frameworks/AudioOverload/aosdk/readme.txt

https://bitbucket.org/quantsini/cog · Plain Text · 81 lines · 50 code · 31 blank · 0 comment · 0 complexity · 921aca4ec5084312000f016eeb43bdc8 MD5 · raw file

  1. Audio Overload SDK - Development Release 1.4.8 February 15, 2009
  2. Copyright (c) 2007-2009 R. Belmont and Richard Bannister.
  3. All rights reserved.
  4. =========================================================
  5. Please refer to license.txt for the specific licensing details of this software.
  6. This SDK opens up some of the music file format engines developed for the Audio Overload project.
  7. You may use this code to play the formats on systems we don't support or inside of applications
  8. other than AO.
  9. Configurables in the makefile:
  10. - Uncomment the line that defines LONG_IS_64BIT for compilation on 64-bit Linux, *BSD, and other operating
  11. systems using the AMD64 recommended ABI (not 64-bit Windows).
  12. - Change LSB_FIRST=1 to =0 for big-endian platforms.
  13. New in Release 1.4.8
  14. - Guard against invalid data sometimes created by makessf.py (fixes crashing Pebble Beach ST-V rips)
  15. Entry points of an AO engine are as follows:
  16. int32 XXX_start(uint8 *, uint32)
  17. This function attempts to recognize and load a file of a specific type. It is assumed external code has
  18. already checked the file's signature in cases where that's possible. The first parameter is a pointer to
  19. the entire file in memory, and the second is the length of the file. The return value is AO_SUCCESS if
  20. the engine properly loaded the file and AO_FAIL if it didn't.
  21. int32 XXX_gen(int16 *, uint32)
  22. This function actually plays the song and generates signed 16-bit stereo samples at 44100 Hz. The first
  23. parameter is a pointer to a buffer in which to place the samples (stereo interleaved), and the second is
  24. the number of stereo samples to generate (so the output buffer size must be (number of samples) * 2 * 2
  25. bytes in length).
  26. int32 XXX_stop(void)
  27. This function ceases playback and cleans up the engine. You must call _start again after this to play more
  28. music.
  29. int32 XXX_command(int32, int32)
  30. For some engines, this allows you to send commands while a song is playing. The first parameter is the
  31. command (these are defined in ao.h), the second is the parameter. These commands are as follows:
  32. COMMAND_PREV (parameter ignored) - for file formats which have more than one song in a file (NSF), this
  33. moves back one song.
  34. COMMAND_NEXT (parameter ignored) - for file formats which have more than one song in a file (NSF), this
  35. moves forward one song.
  36. COMMAND_RESTART (parameter ignored) - Restarts the current song from the beginning. Not supported by
  37. all engines.
  38. COMMAND_HAS_PREV (parameter ignored) - for file formats which have more than one song in a file (NSF),
  39. this checks if moving backwards from the current song is a valid operation. (Returns AO_FAIL if not)
  40. COMMAND_HAS_NEXT (parameter ignored) - for file formats which have more than one song in a file (NSF),
  41. this checks if moving forward from the current song is a valid operation. (Returns AO_FAIL if not)
  42. COMMAND_GET_MIN (parameter ignored) - for file formats which have more than one song in a file (NSF),
  43. this returns the lowest valid song number.
  44. COMMAND_GET_MAX (parameter ignored) - for file formats which have more than one song in a file (NSF),
  45. this returns the highest valid song number.
  46. COMAND_JUMP - for file formats which have more than one song in a file (NSF), this command jumps directly
  47. to a specific song number, which is passed in as the parameter.
  48. int32 XXX_fillinfo(ao_display_info *)
  49. This function fills out the ao_display_info struct (see ao.h for details) with information about the currently
  50. playing song. The information provided varies by engine.