最終更新:2015-10-15 (木) 03:33:11 (1041d)  

Game_Music_Emu はてなブックマークを見る
Top / Game_Music_Emu

http://slack.net/~ant/libs/audio.html

http://code.google.com/p/game-music-emu/

Game_Music_Emu emulates game music in several popular file formats:

対応形式

  • FormatSystem
    AY?ZX Spectrum, Amstrad CPC
    GBSNintendo Game Boy
    GYM?Sega Genesis, Mega Drive
    HES?NEC TurboGrafx?-16, PC Engine
    KSS?MSX Home Computer, other Z80 systems (doesn't support FM sound)
    NSF, NSFE?Nintendo NES, Famicom (with VRC6, N106?, and FME-7? sound)
    SAP?Atari systems using POKEY sound chip
    SPCSuper Nintendo, Super Famicom
    VGM, VGZ?Sega Master System, Mark III, Sega Genesis, Mega Drive, BBC Micro

バージョン

C言語/C++

  • While the library is written in C++, an extensive C interface is provided in Game_Music_Emu/gme.h.
    ファイル説明
    Game_Music_Emu/blargg_config.h?Library configuration
    Game_Music_Emu/gme.hC interface (also usable from C++)
    Game_Music_Emu/Gme_File.h?File loading and track information
    Game_Music_Emu/Music_Emu.h?Track playback and adjustments
    Game_Music_Emu/Data_Reader.h?Custom data readers
    Game_Music_Emu/Effects_Buffer.h?Sound buffer with adjustable stereo echo and panning
    Game_Music_Emu/M3u_Playlist.h?M3U playlist support
    Game_Music_Emu/Gbs_Emu.h?GBS equalizer settings
    Game_Music_Emu/Nsf_Emu.h?NSF equalizer settings
    Game_Music_Emu/Spc_Emu.h?SPC surround disable
    Game_Music_Emu/Vgm_Emu.h?VGM oversampling disable and custom buffer query

タイプ別の機能

  • 機能M3U?VGM?GYM?SPCSAP?NSFE?NSFAY?GBSHES?KSS?
    Track Count
    System
    Game
    Song
    Author
    Copyright
    Comment
    Dumper
    Length
    Intro Length
    Loop Length

再生時間について

  • The library leaves it up to you as to when to stop playing a track. You can ask for available length information and then tell the library what time it should start fading the track with gme_set_fade().
  • By default it also continually checks for 6 or more seconds of silence to mark the end of a track. Here is a reasonable algorithm you can use to decide how long to play a track:
  • If the track length is > 0, use it
  • If the loop length > 0, play for intro + loop * 2
  • Otherwise, default to 2.5 minutes (150000 msec)

ビルド方法

Visual Studio

  • SDLをインストールして
    game-music-emu-0.5.5\gme\CMakeLists.txt
  • -install(TARGETS gme LIBRARY DESTINATION lib)
    +install(TARGETS gme DESTINATION lib)
  • と修正してCMakeでソリューションを生成。
  • gmeプロジェクトの構成プロパティ->全般->構成の種類をダイナミックリンクライブラリ?(DLL)からスタティックリンクライブラリ?(LIB)に変更してビルド
  • demoプロジェクトをビルドして出来上がり

Mac OS X

  • CMakeでUnix Makefiles形式を指定してMakefileを作成すればgme,demoはビルドできる

SDL

  • playerはそのままmakeしようとしても
    Linking CXX executable gme_player
    Undefined symbols:
      "_main", referenced from:
          start in crt1.10.6.o
         (maybe you meant: _SDL_main)
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make[2]: *** [player/gme_player] Error 1
    make[1]: *** [player/CMakeFiles/gme_player.dir/all] Error 2
    make: *** [all] Error 2
  • と表示されるのでplayer/にSDLmain.hとSDLmain.mをコピーし、player/CMakeList?.txtに追記してからCMakeでMakefileを生成すればビルドできる

Ubuntu

0.6.0

AS3への移植

JavaScript

Android

VLC

ライセンス

フォーク?