├── .circleci
└── config.yml
├── .gitignore
├── Readme.md
├── android.toolchain.cmake
├── app
├── .gitignore
├── build.gradle
├── chipbox.jks
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── net
│ │ └── sigmabeta
│ │ └── chipbox
│ │ └── ApplicationTest.java
│ ├── debug
│ ├── AndroidManifest.xml
│ └── res
│ │ └── menu
│ │ └── menu_main.xml
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── img_album_art_blank.png
│ ├── cpp
│ ├── CMakeLists.txt
│ ├── VGMPlay
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── ChipMapper.c
│ │ ├── ChipMapper.h
│ │ ├── VGMFile.h
│ │ ├── VGMPlay.c
│ │ ├── VGMPlay.h
│ │ ├── VGMPlay_AddFmts.c
│ │ ├── VGMPlay_Intf.h
│ │ ├── android
│ │ │ ├── Backend.cpp
│ │ │ ├── Scanner.cpp
│ │ │ ├── net_sigmabeta_chipbox_backend_vgm_BackendImpl.h
│ │ │ └── net_sigmabeta_chipbox_backend_vgm_ScannerImpl.h
│ │ ├── chips
│ │ │ ├── 2151intf.c
│ │ │ ├── 2151intf.h
│ │ │ ├── 2203intf.c
│ │ │ ├── 2203intf.h
│ │ │ ├── 2413intf.c
│ │ │ ├── 2413intf.h
│ │ │ ├── 2413tone.h
│ │ │ ├── 2608intf.c
│ │ │ ├── 2608intf.h
│ │ │ ├── 2610intf.c
│ │ │ ├── 2610intf.h
│ │ │ ├── 2612intf.c
│ │ │ ├── 2612intf.h
│ │ │ ├── 262intf.c
│ │ │ ├── 262intf.h
│ │ │ ├── 281btone.h
│ │ │ ├── 3526intf.c
│ │ │ ├── 3526intf.h
│ │ │ ├── 3812intf.c
│ │ │ ├── 3812intf.h
│ │ │ ├── 8950intf.c
│ │ │ ├── 8950intf.h
│ │ │ ├── ChipIncl.h
│ │ │ ├── Ootake_PSG.c
│ │ │ ├── Ootake_PSG.h
│ │ │ ├── adlibemu_opl2.c
│ │ │ ├── adlibemu_opl2.h
│ │ │ ├── adlibemu_opl3.c
│ │ │ ├── adlibemu_opl3.h
│ │ │ ├── ay8910.c
│ │ │ ├── ay8910.h
│ │ │ ├── ay8910_opl.c
│ │ │ ├── ay_intf.c
│ │ │ ├── ay_intf.h
│ │ │ ├── c140.c
│ │ │ ├── c140.h
│ │ │ ├── c352.c
│ │ │ ├── c352.h
│ │ │ ├── c6280.c
│ │ │ ├── c6280.h
│ │ │ ├── c6280intf.c
│ │ │ ├── c6280intf.h
│ │ │ ├── dac_control.c
│ │ │ ├── dac_control.h
│ │ │ ├── emu2149.c
│ │ │ ├── emu2149.h
│ │ │ ├── emu2413.c
│ │ │ ├── emu2413.h
│ │ │ ├── emu2413_NESpatches.txt
│ │ │ ├── emutypes.h
│ │ │ ├── es5503.c
│ │ │ ├── es5503.h
│ │ │ ├── es5506.c
│ │ │ ├── es5506.h
│ │ │ ├── fm.c
│ │ │ ├── fm.h
│ │ │ ├── fm2612.c
│ │ │ ├── fmopl.c
│ │ │ ├── fmopl.h
│ │ │ ├── gb.c
│ │ │ ├── gb.h
│ │ │ ├── iremga20.c
│ │ │ ├── iremga20.h
│ │ │ ├── k051649.c
│ │ │ ├── k051649.h
│ │ │ ├── k053260.c
│ │ │ ├── k053260.h
│ │ │ ├── k054539.c
│ │ │ ├── k054539.h
│ │ │ ├── mamedef.h
│ │ │ ├── multipcm.c
│ │ │ ├── multipcm.h
│ │ │ ├── nes_apu.c
│ │ │ ├── nes_apu.h
│ │ │ ├── nes_defs.h
│ │ │ ├── nes_intf.c
│ │ │ ├── nes_intf.h
│ │ │ ├── np_nes_apu.c
│ │ │ ├── np_nes_apu.h
│ │ │ ├── np_nes_dmc.c
│ │ │ ├── np_nes_dmc.h
│ │ │ ├── np_nes_fds.c
│ │ │ ├── np_nes_fds.h
│ │ │ ├── okim6258.c
│ │ │ ├── okim6258.h
│ │ │ ├── okim6295.c
│ │ │ ├── okim6295.h
│ │ │ ├── opl2.h
│ │ │ ├── opl3.h
│ │ │ ├── panning.c
│ │ │ ├── panning.h
│ │ │ ├── pokey.c
│ │ │ ├── pokey.h
│ │ │ ├── pwm.c
│ │ │ ├── pwm.h
│ │ │ ├── qsound.c
│ │ │ ├── qsound.h
│ │ │ ├── rf5c68.c
│ │ │ ├── rf5c68.h
│ │ │ ├── saa1099.c
│ │ │ ├── saa1099.h
│ │ │ ├── scd_pcm.c
│ │ │ ├── scd_pcm.h
│ │ │ ├── scsp.c
│ │ │ ├── scsp.h
│ │ │ ├── scspdsp.c
│ │ │ ├── scspdsp.h
│ │ │ ├── scsplfo.c
│ │ │ ├── segapcm.c
│ │ │ ├── segapcm.h
│ │ │ ├── sn76489.c
│ │ │ ├── sn76489.h
│ │ │ ├── sn76496.c
│ │ │ ├── sn76496.h
│ │ │ ├── sn76496_opl.c
│ │ │ ├── sn764intf.c
│ │ │ ├── sn764intf.h
│ │ │ ├── upd7759.c
│ │ │ ├── upd7759.h
│ │ │ ├── vrc7tone.h
│ │ │ ├── vsu.c
│ │ │ ├── vsu.h
│ │ │ ├── ws_audio.c
│ │ │ ├── ws_audio.h
│ │ │ ├── ws_initialIo.h
│ │ │ ├── x1_010.c
│ │ │ ├── x1_010.h
│ │ │ ├── ym2151.c
│ │ │ ├── ym2151.h
│ │ │ ├── ym2413.c
│ │ │ ├── ym2413.h
│ │ │ ├── ym2413_opl.c
│ │ │ ├── ym2413hd.c
│ │ │ ├── ym2413hd.h
│ │ │ ├── ym2612.c
│ │ │ ├── ym2612.h
│ │ │ ├── ymdeltat.c
│ │ │ ├── ymdeltat.h
│ │ │ ├── ymf262.c
│ │ │ ├── ymf262.h
│ │ │ ├── ymf271.c
│ │ │ ├── ymf271.h
│ │ │ ├── ymf278b.c
│ │ │ ├── ymf278b.h
│ │ │ ├── ymz280b.c
│ │ │ └── ymz280b.h
│ │ ├── licenses
│ │ │ ├── GPL.txt
│ │ │ ├── List.txt
│ │ │ └── mame_license.txt
│ │ ├── stdbool.h
│ │ └── zlib
│ │ │ ├── zconf.h
│ │ │ ├── zdll.lib
│ │ │ ├── zlib.def
│ │ │ ├── zlib.h
│ │ │ ├── zlib.lib
│ │ │ └── zlibd.lib
│ ├── gme
│ │ ├── Ay_Apu.cpp
│ │ ├── Ay_Apu.h
│ │ ├── Ay_Cpu.cpp
│ │ ├── Ay_Cpu.h
│ │ ├── Ay_Emu.cpp
│ │ ├── Ay_Emu.h
│ │ ├── Blip_Buffer.cpp
│ │ ├── Blip_Buffer.h
│ │ ├── CMakeLists.txt
│ │ ├── Classic_Emu.cpp
│ │ ├── Classic_Emu.h
│ │ ├── Data_Reader.cpp
│ │ ├── Data_Reader.h
│ │ ├── Dual_Resampler.cpp
│ │ ├── Dual_Resampler.h
│ │ ├── Effects_Buffer.cpp
│ │ ├── Effects_Buffer.h
│ │ ├── Fir_Resampler.cpp
│ │ ├── Fir_Resampler.h
│ │ ├── Gb_Apu.cpp
│ │ ├── Gb_Apu.h
│ │ ├── Gb_Cpu.cpp
│ │ ├── Gb_Cpu.h
│ │ ├── Gb_Oscs.cpp
│ │ ├── Gb_Oscs.h
│ │ ├── Gbs_Emu.cpp
│ │ ├── Gbs_Emu.h
│ │ ├── Gme_File.cpp
│ │ ├── Gme_File.h
│ │ ├── Gym_Emu.cpp
│ │ ├── Gym_Emu.h
│ │ ├── Hes_Apu.cpp
│ │ ├── Hes_Apu.h
│ │ ├── Hes_Cpu.cpp
│ │ ├── Hes_Cpu.h
│ │ ├── Hes_Emu.cpp
│ │ ├── Hes_Emu.h
│ │ ├── Kss_Cpu.cpp
│ │ ├── Kss_Cpu.h
│ │ ├── Kss_Emu.cpp
│ │ ├── Kss_Emu.h
│ │ ├── Kss_Scc_Apu.cpp
│ │ ├── Kss_Scc_Apu.h
│ │ ├── M3u_Playlist.cpp
│ │ ├── M3u_Playlist.h
│ │ ├── Multi_Buffer.cpp
│ │ ├── Multi_Buffer.h
│ │ ├── Music_Emu.cpp
│ │ ├── Music_Emu.h
│ │ ├── Nes_Apu.cpp
│ │ ├── Nes_Apu.h
│ │ ├── Nes_Cpu.cpp
│ │ ├── Nes_Cpu.h
│ │ ├── Nes_Fme7_Apu.cpp
│ │ ├── Nes_Fme7_Apu.h
│ │ ├── Nes_Namco_Apu.cpp
│ │ ├── Nes_Namco_Apu.h
│ │ ├── Nes_Oscs.cpp
│ │ ├── Nes_Oscs.h
│ │ ├── Nes_Vrc6_Apu.cpp
│ │ ├── Nes_Vrc6_Apu.h
│ │ ├── Nsf_Emu.cpp
│ │ ├── Nsf_Emu.h
│ │ ├── Nsfe_Emu.cpp
│ │ ├── Nsfe_Emu.h
│ │ ├── Sap_Apu.cpp
│ │ ├── Sap_Apu.h
│ │ ├── Sap_Cpu.cpp
│ │ ├── Sap_Cpu.h
│ │ ├── Sap_Emu.cpp
│ │ ├── Sap_Emu.h
│ │ ├── Sms_Apu.cpp
│ │ ├── Sms_Apu.h
│ │ ├── Sms_Oscs.h
│ │ ├── Snes_Spc.cpp
│ │ ├── Snes_Spc.h
│ │ ├── Spc_Cpu.cpp
│ │ ├── Spc_Cpu.h
│ │ ├── Spc_Dsp.cpp
│ │ ├── Spc_Dsp.h
│ │ ├── Spc_Emu.cpp
│ │ ├── Spc_Emu.h
│ │ ├── Spc_Filter.cpp
│ │ ├── Spc_Filter.h
│ │ ├── Vgm_Emu.cpp
│ │ ├── Vgm_Emu.h
│ │ ├── Vgm_Emu_Impl.cpp
│ │ ├── Vgm_Emu_Impl.h
│ │ ├── Ym2413_Emu.cpp
│ │ ├── Ym2413_Emu.h
│ │ ├── Ym2612_Emu.cpp
│ │ ├── Ym2612_Emu.h
│ │ ├── android
│ │ │ ├── Backend.cpp
│ │ │ ├── Scanner.cpp
│ │ │ ├── net_sigmabeta_chipbox_backend_gme_BackendImpl.h
│ │ │ └── net_sigmabeta_chipbox_backend_gme_ScannerImpl.h
│ │ ├── blargg_common.h
│ │ ├── blargg_config.h
│ │ ├── blargg_endian.h
│ │ ├── blargg_source.h
│ │ ├── gb_cpu_io.h
│ │ ├── gme.cpp
│ │ ├── gme.h
│ │ ├── hes_cpu_io.h
│ │ ├── libgme.pc.in
│ │ ├── nes_cpu_io.h
│ │ └── sap_cpu_io.h
│ ├── libsamplerate
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── AUTHORS
│ │ ├── CMakeLists.txt
│ │ ├── COPYING
│ │ ├── ChangeLog
│ │ ├── INSTALL
│ │ ├── Make.bat
│ │ ├── Makefile.am
│ │ ├── NEWS
│ │ ├── README
│ │ ├── Win32
│ │ │ ├── Makefile.mingw.in
│ │ │ ├── Makefile.msvc
│ │ │ ├── libsamplerate-0.def
│ │ │ └── unistd.h
│ │ ├── appveyor.yml
│ │ ├── autogen.sh
│ │ ├── cmake
│ │ │ ├── ClipMode.cmake
│ │ │ ├── FindFFTW.cmake
│ │ │ └── FindSndfile.cmake
│ │ ├── config.h.in
│ │ ├── configure.ac
│ │ ├── doc
│ │ │ ├── SRC.css
│ │ │ ├── SRC.png
│ │ │ ├── api.html
│ │ │ ├── api_callback.html
│ │ │ ├── api_full.html
│ │ │ ├── api_misc.html
│ │ │ ├── api_simple.html
│ │ │ ├── bugs.html
│ │ │ ├── download.html
│ │ │ ├── faq.html
│ │ │ ├── foo_dsp_src9.png
│ │ │ ├── history.html
│ │ │ ├── index.html
│ │ │ ├── license.html
│ │ │ ├── lists.html
│ │ │ ├── paypal.png
│ │ │ ├── quality.html
│ │ │ └── win32.html
│ │ ├── examples
│ │ │ ├── audio_out.c
│ │ │ ├── audio_out.h
│ │ │ ├── timewarp-file.c
│ │ │ └── varispeed-play.c
│ │ ├── libsamplerate.spec.in
│ │ ├── m4
│ │ │ ├── ax_append_compile_flags.m4
│ │ │ ├── ax_append_flag.m4
│ │ │ ├── ax_append_link_flags.m4
│ │ │ ├── ax_check_compile_flag.m4
│ │ │ ├── ax_check_link_flag.m4
│ │ │ ├── ax_compiler_vendor.m4
│ │ │ ├── ax_compiler_version.m4
│ │ │ ├── ax_recursive_eval.m4
│ │ │ ├── ax_require_defined.m4
│ │ │ ├── check_signal.m4
│ │ │ └── clip_mode.m4
│ │ ├── samplerate.pc.in
│ │ ├── src
│ │ │ ├── Version_script.in
│ │ │ ├── check_asm.sh
│ │ │ ├── common.h
│ │ │ ├── fastest_coeffs.h
│ │ │ ├── float_cast.h
│ │ │ ├── mid_qual_coeffs.h
│ │ │ ├── samplerate.c
│ │ │ ├── samplerate.h
│ │ │ ├── src_linear.c
│ │ │ ├── src_sinc.c
│ │ │ └── src_zoh.c
│ │ └── tests
│ │ │ ├── calc_snr.c
│ │ │ ├── callback_hang_test.c
│ │ │ ├── callback_test.c
│ │ │ ├── clone_test.c
│ │ │ ├── downsample_test.c
│ │ │ ├── float_short_test.c
│ │ │ ├── misc_test.c
│ │ │ ├── multi_channel_test.c
│ │ │ ├── multichan_throughput_test.c
│ │ │ ├── nullptr_test.c
│ │ │ ├── reset_test.c
│ │ │ ├── simple_test.c
│ │ │ ├── snr_bw_test.c
│ │ │ ├── src-evaluate.c
│ │ │ ├── streaming_test.c
│ │ │ ├── termination_test.c
│ │ │ ├── throughput_test.c
│ │ │ ├── util.c
│ │ │ ├── util.h
│ │ │ └── varispeed_test.c
│ ├── psf
│ │ ├── CMakeLists.txt
│ │ ├── Docs
│ │ │ ├── ChangeLog
│ │ │ ├── LICENSE
│ │ │ ├── README
│ │ │ ├── TODO
│ │ │ ├── psf_format.txt
│ │ │ ├── spu.txt
│ │ │ ├── spu2regs.txt
│ │ │ └── system.txt
│ │ ├── Misc.c
│ │ ├── Misc.h
│ │ ├── PsxBios.c
│ │ ├── PsxBios.h
│ │ ├── PsxCommon.h
│ │ ├── PsxCounters.c
│ │ ├── PsxCounters.h
│ │ ├── PsxDma.c
│ │ ├── PsxDma.h
│ │ ├── PsxHLE.c
│ │ ├── PsxHLE.h
│ │ ├── PsxHw.c
│ │ ├── PsxHw.h
│ │ ├── PsxInterpreter.c
│ │ ├── PsxMem.c
│ │ ├── PsxMem.h
│ │ ├── R3000A.c
│ │ ├── R3000A.h
│ │ ├── Spu.c
│ │ ├── Spu.h
│ │ ├── android
│ │ │ ├── Backend.cpp
│ │ │ └── net_sigmabeta_chipbox_backend_psf_BackendImpl.h
│ │ ├── driver.h
│ │ ├── spu
│ │ │ ├── adsr.c
│ │ │ ├── adsr.h
│ │ │ ├── dma.c
│ │ │ ├── dma.h
│ │ │ ├── externals.h
│ │ │ ├── gauss_i.h
│ │ │ ├── registers.c
│ │ │ ├── registers.h
│ │ │ ├── regs.h
│ │ │ ├── reverb.c
│ │ │ ├── spu.c
│ │ │ ├── spu.h
│ │ │ └── stdafx.h
│ │ └── types.h
│ └── psflib
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── psf2fs.c
│ │ ├── psf2fs.h
│ │ ├── psflib.c
│ │ ├── psflib.h
│ │ ├── psflib.pro
│ │ ├── psflib.vcxproj
│ │ └── psflib.vcxproj.filters
│ ├── img_album_art_blank-web.png
│ ├── java
│ └── net
│ │ └── sigmabeta
│ │ └── chipbox
│ │ ├── ChipboxApplication.kt
│ │ ├── backend
│ │ ├── Backend.kt
│ │ ├── BackendView.kt
│ │ ├── MediaNotificationManager.kt
│ │ ├── NoisyReceiver.kt
│ │ ├── PlayerService.kt
│ │ ├── PrefManager.kt
│ │ ├── ScanService.kt
│ │ ├── Scanner.kt
│ │ ├── SessionCallback.kt
│ │ ├── StatsManager.kt
│ │ ├── UiUpdater.kt
│ │ ├── gme
│ │ │ ├── BackendImpl.kt
│ │ │ └── ScannerImpl.kt
│ │ ├── module
│ │ │ └── AudioModule.kt
│ │ ├── player
│ │ │ ├── Player.kt
│ │ │ ├── Playlist.kt
│ │ │ ├── Reader.kt
│ │ │ ├── Settings.kt
│ │ │ └── Writer.kt
│ │ ├── psf
│ │ │ ├── BackendImpl.kt
│ │ │ └── ScannerImpl.kt
│ │ └── vgm
│ │ │ ├── BackendImpl.kt
│ │ │ └── ScannerImpl.kt
│ │ ├── dagger
│ │ ├── Initializer.kt
│ │ ├── component
│ │ │ ├── AppComponent.kt
│ │ │ └── FragmentComponent.kt
│ │ ├── module
│ │ │ ├── AppModule.kt
│ │ │ └── PreferenceModule.kt
│ │ └── scope
│ │ │ ├── ActivityScoped.kt
│ │ │ └── BackendScoped.kt
│ │ ├── model
│ │ ├── IdRealmObject.kt
│ │ ├── audio
│ │ │ ├── AudioBuffer.kt
│ │ │ ├── AudioConfig.kt
│ │ │ └── Voice.kt
│ │ ├── database
│ │ │ ├── RealmUtils.kt
│ │ │ └── module
│ │ │ │ └── RepositoryModule.kt
│ │ ├── domain
│ │ │ ├── Artist.kt
│ │ │ ├── Game.kt
│ │ │ ├── ListItem.kt
│ │ │ ├── Platform.kt
│ │ │ └── Track.kt
│ │ ├── events
│ │ │ ├── FileScanCompleteEvent.kt
│ │ │ ├── FileScanEvent.kt
│ │ │ ├── FileScanFailedEvent.kt
│ │ │ ├── GameEvent.kt
│ │ │ ├── PlaybackEvent.kt
│ │ │ ├── PositionEvent.kt
│ │ │ ├── StateEvent.kt
│ │ │ └── TrackEvent.kt
│ │ ├── file
│ │ │ ├── FileListItem.kt
│ │ │ └── Folder.kt
│ │ └── repository
│ │ │ ├── LibraryScanner.kt
│ │ │ ├── RealmRepository.kt
│ │ │ └── Repository.kt
│ │ ├── ui
│ │ ├── ActivityPresenter.kt
│ │ ├── BaseActivity.kt
│ │ ├── BaseArrayAdapter.kt
│ │ ├── BaseFragment.kt
│ │ ├── BasePresenter.kt
│ │ ├── BaseView.kt
│ │ ├── BaseViewHolder.kt
│ │ ├── ChromeActivity.kt
│ │ ├── ChromePresenter.kt
│ │ ├── ChromeView.kt
│ │ ├── DiffCallback.kt
│ │ ├── FragmentContainer.kt
│ │ ├── FragmentPresenter.kt
│ │ ├── InvalidClearViewException.kt
│ │ ├── ListFragment.kt
│ │ ├── ListPresenter.kt
│ │ ├── ListView.kt
│ │ ├── NavigationFragment.kt
│ │ ├── UiState.kt
│ │ ├── artist
│ │ │ ├── ArtistListAdapter.kt
│ │ │ ├── ArtistListFragment.kt
│ │ │ ├── ArtistListPresenter.kt
│ │ │ ├── ArtistListView.kt
│ │ │ └── ArtistViewHolder.kt
│ │ ├── debug
│ │ │ ├── DebugActivity.kt
│ │ │ ├── DebugPresenter.kt
│ │ │ └── DebugView.kt
│ │ ├── game
│ │ │ ├── GameActivity.kt
│ │ │ ├── GameHeaderViewHolder.kt
│ │ │ ├── GamePresenter.kt
│ │ │ ├── GameTrackListAdapter.kt
│ │ │ ├── GameTrackViewHolder.kt
│ │ │ └── GameView.kt
│ │ ├── games
│ │ │ ├── GameGridAdapter.kt
│ │ │ ├── GameGridFragment.kt
│ │ │ ├── GameGridPresenter.kt
│ │ │ ├── GameListView.kt
│ │ │ └── GameViewHolder.kt
│ │ ├── main
│ │ │ ├── MainActivity.kt
│ │ │ ├── MainPresenter.kt
│ │ │ ├── MainTabPagerAdapter.kt
│ │ │ └── MainView.kt
│ │ ├── navigation
│ │ │ ├── NavigationActivity.kt
│ │ │ ├── NavigationPresenter.kt
│ │ │ └── NavigationView.kt
│ │ ├── onboarding
│ │ │ ├── OnboardingActivity.kt
│ │ │ ├── OnboardingPresenter.kt
│ │ │ ├── OnboardingView.kt
│ │ │ ├── library
│ │ │ │ ├── LibraryFragment.kt
│ │ │ │ ├── LibraryPresenter.kt
│ │ │ │ └── LibraryView.kt
│ │ │ └── title
│ │ │ │ ├── TitleFragment.kt
│ │ │ │ ├── TitlePresenter.kt
│ │ │ │ └── TitleView.kt
│ │ ├── platform
│ │ │ ├── PlatformListAdapter.kt
│ │ │ ├── PlatformListFragment.kt
│ │ │ ├── PlatformListPresenter.kt
│ │ │ ├── PlatformListView.kt
│ │ │ └── PlatformViewHolder.kt
│ │ ├── player
│ │ │ ├── PlayerActivity.kt
│ │ │ ├── PlayerActivityPresenter.kt
│ │ │ ├── PlayerActivityView.kt
│ │ │ ├── PlayerControlsView.kt
│ │ │ └── PlayerFragmentView.kt
│ │ ├── playlist
│ │ │ ├── PlaylistAdapter.kt
│ │ │ ├── PlaylistFragment.kt
│ │ │ ├── PlaylistFragmentPresenter.kt
│ │ │ ├── PlaylistFragmentView.kt
│ │ │ └── PlaylistTrackViewHolder.kt
│ │ ├── settings
│ │ │ ├── SettingsActivity.kt
│ │ │ ├── SettingsPresenter.kt
│ │ │ ├── SettingsView.kt
│ │ │ ├── VoiceViewHolder.kt
│ │ │ └── VoicesAdapter.kt
│ │ ├── track
│ │ │ ├── TrackListAdapter.kt
│ │ │ ├── TrackListFragment.kt
│ │ │ ├── TrackListPresenter.kt
│ │ │ ├── TrackListView.kt
│ │ │ └── TrackViewHolder.kt
│ │ └── util
│ │ │ └── GridSpaceDecoration.kt
│ │ └── util
│ │ ├── ByteArrayExtensions.kt
│ │ ├── File.kt
│ │ ├── Images.kt
│ │ ├── Pixels.kt
│ │ └── animation
│ │ ├── Animation.kt
│ │ ├── ChangeBoundsFade.kt
│ │ ├── CustomTextView.kt
│ │ ├── Fade.kt
│ │ ├── FadeSlide.kt
│ │ ├── Pop.kt
│ │ ├── ReflowData.kt
│ │ ├── ReflowText.kt
│ │ ├── ReflowableTextView.kt
│ │ ├── Run.kt
│ │ └── SwitchDrawable.kt
│ └── res
│ ├── anim
│ ├── fade_in_bottom.xml
│ ├── fade_in_left.xml
│ ├── fade_in_right.xml
│ ├── fade_out_left.xml
│ ├── fade_out_right.xml
│ ├── fragment_enter.xml
│ ├── fragment_exit.xml
│ ├── fragment_pop_enter.xml
│ └── fragment_pop_exit.xml
│ ├── drawable-hdpi-v11
│ ├── ic_stat_pause.png
│ └── ic_stat_play.png
│ ├── drawable-hdpi
│ ├── ic_stat_pause.png
│ ├── ic_stat_play.png
│ └── img_album_art_blank.png
│ ├── drawable-mdpi-v11
│ ├── ic_stat_pause.png
│ └── ic_stat_play.png
│ ├── drawable-mdpi
│ ├── ic_stat_pause.png
│ ├── ic_stat_play.png
│ └── img_album_art_blank.png
│ ├── drawable-xhdpi-v11
│ ├── ic_stat_pause.png
│ └── ic_stat_play.png
│ ├── drawable-xhdpi
│ ├── ic_stat_pause.png
│ ├── ic_stat_play.png
│ ├── img_album_art_blank.png
│ ├── img_onboarding_library.png
│ └── img_onboarding_logo.png
│ ├── drawable-xxhdpi-v11
│ ├── ic_stat_pause.png
│ └── ic_stat_play.png
│ ├── drawable-xxhdpi
│ ├── ic_stat_pause.png
│ ├── ic_stat_play.png
│ ├── img_album_art_blank.png
│ ├── img_onboarding_library.png
│ └── img_onboarding_logo.png
│ ├── drawable-xxxhdpi-v11
│ ├── ic_stat_pause.png
│ └── ic_stat_play.png
│ ├── drawable-xxxhdpi
│ ├── ic_stat_pause.png
│ ├── ic_stat_play.png
│ ├── img_onboarding_library.png
│ └── img_onboarding_logo.png
│ ├── drawable
│ ├── bg_launcher.xml
│ ├── bg_playlist_track.xml
│ ├── ic_add_black_24dp.xml
│ ├── ic_audiotrack_black_24dp.xml
│ ├── ic_clear_white_24dp.xml
│ ├── ic_drag_handle_black_24dp.xml
│ ├── ic_folder_black_24dp.xml
│ ├── ic_help_black_24dp.xml
│ ├── ic_insert_drive_file_black_24dp.xml
│ ├── ic_loop_black_24dp.xml
│ ├── ic_pause_black_24dp.xml
│ ├── ic_play_arrow_black_24dp.xml
│ ├── ic_queue_music_black_24dp.xml
│ ├── ic_refresh_black_24dp.xml
│ ├── ic_repeat_black_24dp.xml
│ ├── ic_repeat_one_black_24dp.xml
│ ├── ic_settings_black_24dp.xml
│ ├── ic_shuffle_black_24dp.xml
│ ├── ic_skip_next_black_24dp.xml
│ ├── ic_skip_previous_black_24dp.xml
│ └── oval_ripple_grey.xml
│ ├── font
│ ├── roboto_condensed.ttf
│ ├── roboto_medium.ttf
│ └── roboto_regular.ttf
│ ├── layout
│ ├── activity_chrome.xml
│ ├── activity_debug.xml
│ ├── activity_files.xml
│ ├── activity_game.xml
│ ├── activity_main.xml
│ ├── activity_navigation.xml
│ ├── activity_onboarding.xml
│ ├── activity_player.xml
│ ├── activity_scan.xml
│ ├── activity_settings.xml
│ ├── dropdown_after_click_tempo.xml
│ ├── dropdown_before_click_tempo.xml
│ ├── fragment_album.xml
│ ├── fragment_file_list.xml
│ ├── fragment_library.xml
│ ├── fragment_list.xml
│ ├── fragment_title.xml
│ ├── grid_item_game.xml
│ ├── header_navigation_main.xml
│ ├── layout_status.xml
│ ├── list_header_game.xml
│ ├── list_item_artist.xml
│ ├── list_item_file.xml
│ ├── list_item_platform.xml
│ ├── list_item_track.xml
│ ├── list_item_track_game.xml
│ ├── list_item_track_playlist.xml
│ └── list_item_track_voice.xml
│ ├── menu
│ └── menu_main.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ └── img_album_art_blank.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ └── img_album_art_blank.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ └── img_album_art_blank.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ └── img_album_art_blank.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ └── img_album_art_blank.png
│ ├── transition
│ ├── enter_game.xml
│ ├── enter_player.xml
│ ├── nonshared_enter.xml
│ ├── nonshared_return.xml
│ ├── return_game.xml
│ ├── return_player.xml
│ └── shared_exit.xml
│ ├── values-w520dp
│ └── fragment_game_grid.xml
│ ├── values-w720dp
│ └── fragment_game_grid.xml
│ └── values
│ ├── animation-durations.xml
│ ├── arrays.xml
│ ├── attrs_changebounds_fade.xml
│ ├── attrs_custom_text_view.xml
│ ├── attrs_reflow_text.xml
│ ├── attrs_transitions.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── floats.xml
│ ├── fragment_game_grid.xml
│ ├── ids.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── web_hi_res_512.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # built application files
2 | *.apk
3 | *.ap_
4 |
5 | # files for the dex VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # generated files
12 | /bin/
13 | /gen/
14 | /libs/
15 | /obj/
16 |
17 | # Local configuration file (sdk path, etc)
18 | local.properties
19 |
20 | # Eclipse project files
21 | .classpath
22 | .project
23 |
24 | # Android Studio
25 | /*/local.properties
26 | /*/out
27 | /*/*/build
28 | /*/*/production
29 | *.iws
30 | *~
31 | *.swp
32 | workspace.xml
33 | tasks.xml
34 | .gradle/*
35 | .idea
36 | build/
37 | *.iml
38 | build.properties
39 | .so
40 | app/src/main/jniLibs/
41 |
42 | *placeholder*
43 |
44 | .gradle/
45 | app/.externalNativeBuild/
46 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/chipbox.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/chipbox.jks
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/ederbastos/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | -dontobfuscate
20 |
21 | -dontwarn kotlin.**
22 | -dontwarn sun.misc.Unsafe
23 | -dontwarn com.squareup.okhttp.**
--------------------------------------------------------------------------------
/app/src/androidTest/java/net/sigmabeta/chipbox/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/debug/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/assets/img_album_art_blank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/src/main/assets/img_album_art_blank.png
--------------------------------------------------------------------------------
/app/src/main/cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # CMake project definition file.
2 | project(libchipbox)
3 |
4 | # 2.6+ always assumes FATAL_ERROR, but 2.4 and below don't.
5 | # Of course, 2.4 might work, in which case you're welcome to drop
6 | # down the requirement, but I can't test that.
7 | cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
8 |
9 | # Shared library defined here
10 | add_subdirectory(gme)
11 | add_subdirectory(VGMPlay)
12 | add_subdirectory(psf)
13 | add_subdirectory(psflib)
14 | add_subdirectory(libsamplerate)
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/.gitignore:
--------------------------------------------------------------------------------
1 | /obj
2 | /vgm2pcm
3 | /vgmplay
4 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # List of source files required by libvgm and any emulators
2 |
3 | AUX_SOURCE_DIRECTORY(. VGM_SRCS)
4 | AUX_SOURCE_DIRECTORY(chips CHIPS_SRCS)
5 | set(libvgm_SRCS ${CHIPS_SRCS}
6 | ${VGM_SRCS}
7 | android/Scanner.cpp
8 | android/Backend.cpp )
9 |
10 | # Add library to be compiled.
11 | add_library(vgm SHARED ${libvgm_SRCS})
12 |
13 | # Not sure what most of this means, but apparently it links to "android.h", "zlib.h" and "log.h"
14 | if(ANDROID)
15 | target_link_libraries(vgm
16 | log
17 | android
18 | z
19 | "-Wl,--no-warn-mismatch"
20 | "-Wl,--whole-archive"
21 | ${LIBS}
22 | "-Wl,--no-whole-archive"
23 | )
24 | endif()
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/ChipMapper.h:
--------------------------------------------------------------------------------
1 | void open_fm_option(UINT8 ChipType, UINT8 OptType, UINT32 OptVal);
2 |
3 | void opl_chip_reset(void);
4 |
5 | void open_real_fm(void);
6 |
7 | void reset_real_fm(void);
8 |
9 | void setup_real_fm(UINT8 ChipType, UINT8 ChipID);
10 |
11 | void close_real_fm(void);
12 |
13 | void chip_reg_write(UINT8 ChipType, UINT8 ChipID, UINT8 Port, UINT8 Offset, UINT8 Data);
14 |
15 | void OPL_Hardware_Detecton(void);
16 |
17 | void OPL_HW_WriteReg(UINT16 Reg, UINT8 Data);
18 |
19 | void OPL_RegMapper(UINT16 Reg, UINT8 Data);
20 |
21 | void RefreshVolume(void);
22 |
23 | void StartSkipping(void);
24 |
25 | void StopSkipping(void);
26 |
27 | void ym2413opl_set_emu_core(UINT8 Emulator);
28 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/2151intf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | /*typedef struct _ym2151_interface ym2151_interface;
4 | struct _ym2151_interface
5 | {
6 | //void (*irqhandler)(const device_config *device, int irq);
7 | void (*irqhandler)(int irq);
8 | write8_device_func portwritehandler;
9 | };*/
10 |
11 | /*READ8_DEVICE_HANDLER( ym2151_r );
12 | WRITE8_DEVICE_HANDLER( ym2151_w );
13 |
14 | READ8_DEVICE_HANDLER( ym2151_status_port_r );
15 | WRITE8_DEVICE_HANDLER( ym2151_register_port_w );
16 | WRITE8_DEVICE_HANDLER( ym2151_data_port_w );
17 |
18 | DEVICE_GET_INFO( ym2151 );
19 | #define SOUND_YM2151 DEVICE_GET_INFO_NAME( ym2151 )*/
20 | void ym2151_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
21 |
22 | int device_start_ym2151(UINT8 ChipID, int clock);
23 |
24 | void device_stop_ym2151(UINT8 ChipID);
25 |
26 | void device_reset_ym2151(UINT8 ChipID);
27 |
28 | UINT8 ym2151_r(UINT8 ChipID, offs_t offset);
29 |
30 | void ym2151_w(UINT8 ChipID, offs_t offset, UINT8 data);
31 |
32 | UINT8 ym2151_status_port_r(UINT8 ChipID, offs_t offset);
33 |
34 | void ym2151_register_port_w(UINT8 ChipID, offs_t offset, UINT8 data);
35 |
36 | void ym2151_data_port_w(UINT8 ChipID, offs_t offset, UINT8 data);
37 |
38 | void ym2151_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
39 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/2413intf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | /*WRITE8_DEVICE_HANDLER( ym2413_w );
4 |
5 | WRITE8_DEVICE_HANDLER( ym2413_register_port_w );
6 | WRITE8_DEVICE_HANDLER( ym2413_data_port_w );
7 |
8 | DEVICE_GET_INFO( ym2413 );
9 | #define SOUND_YM2413 DEVICE_GET_INFO_NAME( ym2413 )*/
10 |
11 | void ym2413_stream_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
12 |
13 | int device_start_ym2413(UINT8 ChipID, int clock);
14 |
15 | void device_stop_ym2413(UINT8 ChipID);
16 |
17 | void device_reset_ym2413(UINT8 ChipID);
18 |
19 | void ym2413_w(UINT8 ChipID, offs_t offset, UINT8 data);
20 |
21 | void ym2413_register_port_w(UINT8 ChipID, offs_t offset, UINT8 data);
22 |
23 | void ym2413_data_port_w(UINT8 ChipID, offs_t offset, UINT8 data);
24 |
25 | void ym2413_set_emu_core(UINT8 Emulator);
26 |
27 | void ym2413_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
28 |
29 | void ym2413_set_panning(UINT8 ChipID, INT16 *PanVals);
30 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/2413tone.h:
--------------------------------------------------------------------------------
1 | /* YM2413 tone by okazaki@angel.ne.jp */
2 | 0x49,0x4c,0x4c,0x32,0x00,0x00,0x00,0x00,
3 | 0x61,0x61,0x1e,0x17,0xf0,0x7f,0x00,0x17,
4 | 0x13,0x41,0x16,0x0e,0xfd,0xf4,0x23,0x23,
5 | 0x03,0x01,0x9a,0x04,0xf3,0xf3,0x13,0xf3,
6 | 0x11,0x61,0x0e,0x07,0xfa,0x64,0x70,0x17,
7 | 0x22,0x21,0x1e,0x06,0xf0,0x76,0x00,0x28,
8 | 0x21,0x22,0x16,0x05,0xf0,0x71,0x00,0x18,
9 | 0x21,0x61,0x1d,0x07,0x82,0x80,0x17,0x17,
10 | 0x23,0x21,0x2d,0x16,0x90,0x90,0x00,0x07,
11 | 0x21,0x21,0x1b,0x06,0x64,0x65,0x10,0x17,
12 | 0x21,0x21,0x0b,0x1a,0x85,0xa0,0x70,0x07,
13 | 0x23,0x01,0x83,0x10,0xff,0xb4,0x10,0xf4,
14 | 0x97,0xc1,0x20,0x07,0xff,0xf4,0x22,0x22,
15 | 0x61,0x00,0x0c,0x05,0xc2,0xf6,0x40,0x44,
16 | 0x01,0x01,0x56,0x03,0x94,0xc2,0x03,0x12,
17 | 0x21,0x01,0x89,0x03,0xf1,0xe4,0xf0,0x23,
18 | 0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,
19 | 0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,
20 | 0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/262intf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 |
4 | /*typedef struct _ymf262_interface ymf262_interface;
5 | struct _ymf262_interface
6 | {
7 | //void (*handler)(const device_config *device, int irq);
8 | void (*handler)(int irq);
9 | };*/
10 |
11 |
12 | /*READ8_DEVICE_HANDLER( ymf262_r );
13 | WRITE8_DEVICE_HANDLER( ymf262_w );
14 |
15 | READ8_DEVICE_HANDLER ( ymf262_status_r );
16 | WRITE8_DEVICE_HANDLER( ymf262_register_a_w );
17 | WRITE8_DEVICE_HANDLER( ymf262_register_b_w );
18 | WRITE8_DEVICE_HANDLER( ymf262_data_a_w );
19 | WRITE8_DEVICE_HANDLER( ymf262_data_b_w );
20 |
21 |
22 | DEVICE_GET_INFO( ymf262 );
23 | #define SOUND_YMF262 DEVICE_GET_INFO_NAME( ymf262 )*/
24 |
25 | void ymf262_stream_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
26 |
27 | int device_start_ymf262(UINT8 ChipID, int clock);
28 |
29 | void device_stop_ymf262(UINT8 ChipID);
30 |
31 | void device_reset_ymf262(UINT8 ChipID);
32 |
33 | UINT8 ymf262_r(UINT8 ChipID, offs_t offset);
34 |
35 | void ymf262_w(UINT8 ChipID, offs_t offset, UINT8 data);
36 |
37 | UINT8 ymf262_status_r(UINT8 ChipID, offs_t offset);
38 |
39 | void ymf262_register_a_w(UINT8 ChipID, offs_t offset, UINT8 data);
40 |
41 | void ymf262_register_b_w(UINT8 ChipID, offs_t offset, UINT8 data);
42 |
43 | void ymf262_data_a_w(UINT8 ChipID, offs_t offset, UINT8 data);
44 |
45 | void ymf262_data_b_w(UINT8 ChipID, offs_t offset, UINT8 data);
46 |
47 | void ymf262_set_emu_core(UINT8 Emulator);
48 |
49 | void ymf262_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/281btone.h:
--------------------------------------------------------------------------------
1 | /* YMF281B tone by Chabin */
2 | 0x49,0x4c,0x4c,0x32,0x00,0x00,0x00,0x00,
3 | 0x62,0x21,0x1a,0x07,0xf0,0x6f,0x00,0x16,
4 | 0x00,0x10,0x44,0x02,0xf6,0xf4,0x54,0x23,
5 | 0x03,0x01,0x97,0x04,0xf3,0xf3,0x13,0xf3,
6 | 0x01,0x61,0x0a,0x0f,0xfa,0x64,0x70,0x17,
7 | 0x22,0x21,0x1e,0x06,0xf0,0x76,0x00,0x28,
8 | 0x00,0x61,0x8a,0x0e,0xc0,0x61,0x00,0x07,
9 | 0x21,0x61,0x1b,0x07,0x84,0x80,0x17,0x17,
10 | 0x37,0x32,0xc9,0x01,0x66,0x64,0x40,0x28,
11 | 0x01,0x21,0x06,0x03,0xa5,0x71,0x51,0x07,
12 | 0x06,0x11,0x5e,0x07,0xf3,0xf2,0xf6,0x11,
13 | 0x00,0x20,0x18,0x06,0xf5,0xf3,0x20,0x26,
14 | 0x97,0x41,0x20,0x07,0xff,0xf4,0x22,0x22,
15 | 0x65,0x61,0x15,0x00,0xf7,0xf3,0x16,0xf4,
16 | 0x01,0x31,0x0e,0x07,0xfa,0xf3,0xff,0xff,
17 | 0x48,0x61,0x09,0x07,0xf1,0x94,0xf0,0xf5,
18 | 0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,
19 | 0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,
20 | 0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/3526intf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | /*typedef struct _ym3526_interface ym3526_interface;
4 | struct _ym3526_interface
5 | {
6 | //void (*handler)(const device_config *device, int linestate);
7 | void (*handler)(int linestate);
8 | };*/
9 |
10 | /*READ8_DEVICE_HANDLER( ym3526_r );
11 | WRITE8_DEVICE_HANDLER( ym3526_w );
12 |
13 | READ8_DEVICE_HANDLER( ym3526_status_port_r );
14 | READ8_DEVICE_HANDLER( ym3526_read_port_r );
15 | WRITE8_DEVICE_HANDLER( ym3526_control_port_w );
16 | WRITE8_DEVICE_HANDLER( ym3526_write_port_w );
17 |
18 | DEVICE_GET_INFO( ym3526 );
19 | #define SOUND_YM3526 DEVICE_GET_INFO_NAME( ym3526 )*/
20 | void ym3526_stream_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
21 |
22 | int device_start_ym3526(UINT8 ChipID, int clock);
23 |
24 | void device_stop_ym3526(UINT8 ChipID);
25 |
26 | void device_reset_ym3526(UINT8 ChipID);
27 |
28 | UINT8 ym3526_r(UINT8 ChipID, offs_t offset);
29 |
30 | void ym3526_w(UINT8 ChipID, offs_t offset, UINT8 data);
31 |
32 | UINT8 ym3526_status_port_r(UINT8 ChipID, offs_t offset);
33 |
34 | UINT8 ym3526_read_port_r(UINT8 ChipID, offs_t offset);
35 |
36 | void ym3526_control_port_w(UINT8 ChipID, offs_t offset, UINT8 data);
37 |
38 | void ym3526_write_port_w(UINT8 ChipID, offs_t offset, UINT8 data);
39 |
40 | void ym3526_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
41 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/3812intf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | /*typedef struct _ym3812_interface ym3812_interface;
4 | struct _ym3812_interface
5 | {
6 | //void (*handler)(const device_config *device, int linestate);
7 | void (*handler)(int linestate);
8 | };*/
9 |
10 | /*READ8_DEVICE_HANDLER( ym3812_r );
11 | WRITE8_DEVICE_HANDLER( ym3812_w );
12 |
13 | READ8_DEVICE_HANDLER( ym3812_status_port_r );
14 | READ8_DEVICE_HANDLER( ym3812_read_port_r );
15 | WRITE8_DEVICE_HANDLER( ym3812_control_port_w );
16 | WRITE8_DEVICE_HANDLER( ym3812_write_port_w );
17 |
18 | DEVICE_GET_INFO( ym3812 );
19 | #define SOUND_YM3812 DEVICE_GET_INFO_NAME( ym3812 )*/
20 |
21 | void ym3812_stream_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
22 |
23 | int device_start_ym3812(UINT8 ChipID, int clock);
24 |
25 | void device_stop_ym3812(UINT8 ChipID);
26 |
27 | void device_reset_ym3812(UINT8 ChipID);
28 |
29 | UINT8 ym3812_r(UINT8 ChipID, offs_t offset);
30 |
31 | void ym3812_w(UINT8 ChipID, offs_t offset, UINT8 data);
32 |
33 | UINT8 ym3812_status_port_r(UINT8 ChipID, offs_t offset);
34 |
35 | UINT8 ym3812_read_port_r(UINT8 ChipID, offs_t offset);
36 |
37 | void ym3812_control_port_w(UINT8 ChipID, offs_t offset, UINT8 data);
38 |
39 | void ym3812_write_port_w(UINT8 ChipID, offs_t offset, UINT8 data);
40 |
41 | void ym3812_set_emu_core(UINT8 Emulator);
42 |
43 | void ym3812_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
44 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/ChipIncl.h:
--------------------------------------------------------------------------------
1 | // includes all chip-headers
2 |
3 | #include "sn764intf.h"
4 | #include "2413intf.h"
5 | #include "2612intf.h"
6 | #include "2151intf.h"
7 | #include "segapcm.h"
8 | #include "rf5c68.h"
9 | #include "2203intf.h"
10 | #include "2608intf.h"
11 | #include "2610intf.h"
12 | #include "3812intf.h"
13 | #include "3526intf.h"
14 | #include "8950intf.h"
15 | #include "262intf.h"
16 | #include "ymz280b.h"
17 | #include "ymf271.h"
18 | #include "ymf278b.h"
19 | #include "scd_pcm.h"
20 | #include "pwm.h"
21 | #include "ay_intf.h"
22 | #include "dac_control.h"
23 | #include "gb.h"
24 | #include "nes_intf.h"
25 | #include "multipcm.h"
26 | #include "upd7759.h"
27 | #include "okim6258.h"
28 | #include "okim6295.h"
29 | #include "k051649.h"
30 | #include "k054539.h"
31 | #include "c6280intf.h"
32 | #include "c140.h"
33 | #include "k053260.h"
34 | #include "pokey.h"
35 | #include "qsound.h"
36 | #include "scsp.h"
37 | #include "ws_audio.h"
38 | #include "vsu.h"
39 | #include "saa1099.h"
40 | #include "es5503.h"
41 | #include "es5506.h"
42 | #include "x1_010.h"
43 | #include "c352.h"
44 | #include "iremga20.h"
45 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/adlibemu_opl2.h:
--------------------------------------------------------------------------------
1 | #ifndef CHIPBOX_ADLIBEMU_OPL2_H
2 | #define CHIPBOX_ADLIBEMU_OPL2_H
3 |
4 | #include "mamedef.h"
5 | #include "opl2.h"
6 |
7 | typedef void (*ADL_UPDATEHANDLER)(void *param);
8 |
9 | void *adlib_OPL2_init(UINT32 clock, UINT32 samplerate,
10 | ADL_UPDATEHANDLER UpdateHandler, void *param);
11 |
12 | void adlib_OPL2_stop(void *chip);
13 |
14 | void adlib_OPL2_reset(void *chip);
15 |
16 | void adlib_OPL2_writeIO(void *chip, UINT32 addr, UINT8 val);
17 |
18 | void adlib_OPL2_getsample(void *chip, INT32 **sndptr, INT32 numsamples);
19 |
20 | UINT32 adlib_OPL2_reg_read(void *chip, UINT32 port);
21 |
22 | void adlib_OPL2_write_index(void *chip, UINT32 port, UINT8 val);
23 |
24 | void adlib_OPL2_set_mute_mask(void *chip, UINT32 MuteMask);
25 |
26 |
27 | #endif //CHIPBOX_ADLIBEMU_OPL2_H
28 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/adlibemu_opl3.h:
--------------------------------------------------------------------------------
1 | #ifndef CHIPBOX_ADLIBEMU_OPL3_H
2 | #define CHIPBOX_ADLIBEMU_OPL3_H
3 |
4 | #include "mamedef.h"
5 | #include "opl3.h"
6 |
7 | void *adlib_OPL3_init(UINT32 clock, UINT32 samplerate,
8 | ADL_UPDATEHANDLER UpdateHandler, void *param);
9 |
10 | void adlib_OPL3_stop(void *chip);
11 |
12 | void adlib_OPL3_reset(void *chip);
13 |
14 | void adlib_OPL3_writeIO(void *chip, UINT32 addr, UINT8 val);
15 |
16 | void adlib_OPL3_getsample(void *chip, INT32 **sndptr, INT32 numsamples);
17 |
18 | UINT32 adlib_OPL3_reg_read(void *chip, UINT32 port);
19 |
20 | void adlib_OPL3_write_index(void *chip, UINT32 port, UINT8 val);
21 |
22 | void adlib_OPL3_set_mute_mask(void *chip, UINT32 MuteMask);
23 |
24 | #endif //CHIPBOX_ADLIBEMU_OPL3_H
25 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/ay_intf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | void ayxx_stream_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
4 |
5 | int device_start_ayxx(UINT8 ChipID, int clock, UINT8 chip_type, UINT8 Flags);
6 |
7 | void device_stop_ayxx(UINT8 ChipID);
8 |
9 | void device_reset_ayxx(UINT8 ChipID);
10 |
11 | void ayxx_w(UINT8 ChipID, offs_t offset, UINT8 data);
12 |
13 | void ayxx_set_emu_core(UINT8 Emulator);
14 |
15 | void ayxx_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
16 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/c140.h:
--------------------------------------------------------------------------------
1 | /* C140.h */
2 |
3 | #pragma once
4 |
5 | void c140_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
6 |
7 | int device_start_c140(UINT8 ChipID, int clock, int banking_type);
8 |
9 | void device_stop_c140(UINT8 ChipID);
10 |
11 | void device_reset_c140(UINT8 ChipID);
12 |
13 | //READ8_DEVICE_HANDLER( c140_r );
14 | //WRITE8_DEVICE_HANDLER( c140_w );
15 | UINT8 c140_r(UINT8 ChipID, offs_t offset);
16 |
17 | void c140_w(UINT8 ChipID, offs_t offset, UINT8 data);
18 |
19 | //void c140_set_base(device_t *device, void *base);
20 | void c140_set_base(UINT8 ChipID, void *base);
21 |
22 | enum {
23 | C140_TYPE_SYSTEM2,
24 | C140_TYPE_SYSTEM21,
25 | C140_TYPE_ASIC219
26 | };
27 |
28 | /*typedef struct _c140_interface c140_interface;
29 | struct _c140_interface {
30 | int banking_type;
31 | };*/
32 |
33 |
34 | void c140_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
35 | const UINT8 *ROMData);
36 |
37 | void c140_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
38 |
39 | //DECLARE_LEGACY_SOUND_DEVICE(C140, c140);
40 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/c352.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef __C352_H__
4 | #define __C352_H__
5 |
6 | void c352_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
7 |
8 | int device_start_c352(UINT8 ChipID, int clock, int clkdiv);
9 |
10 | void device_stop_c352(UINT8 ChipID);
11 |
12 | void device_reset_c352(UINT8 ChipID);
13 |
14 | UINT16 c352_r(UINT8 ChipID, offs_t offset);
15 |
16 | void c352_w(UINT8 ChipID, offs_t offset, UINT16 data);
17 |
18 | void c352_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
19 | const UINT8 *ROMData);
20 |
21 | void c352_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
22 |
23 | void c352_set_options(UINT8 Flags);
24 |
25 | #endif /* __C352_H__ */
26 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/c6280.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | //#include "devlegcy.h"
4 |
5 | typedef struct _c6280_interface c6280_interface;
6 | struct _c6280_interface {
7 | const char *cpu;
8 | };
9 |
10 | /* Function prototypes */
11 | //WRITE8_DEVICE_HANDLER( c6280_w );
12 | //READ8_DEVICE_HANDLER( c6280_r );
13 | void c6280m_w(void *chip, offs_t offset, UINT8 data);
14 |
15 | UINT8 c6280m_r(void *chip, offs_t offset);
16 |
17 | void c6280m_update(void *param, stream_sample_t **outputs, int samples);
18 |
19 | void *device_start_c6280m(int clock, int rate);
20 |
21 | void device_stop_c6280m(void *chip);
22 |
23 | void device_reset_c6280m(void *chip);
24 |
25 | void c6280m_set_mute_mask(void *chip, UINT32 MuteMask);
26 |
27 | //DECLARE_LEGACY_SOUND_DEVICE(C6280, c6280);
28 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/c6280intf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | void c6280_w(UINT8 ChipID, offs_t offset, UINT8 data);
4 |
5 | UINT8 c6280_r(UINT8 ChipID, offs_t offset);
6 |
7 | void c6280_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
8 |
9 | int device_start_c6280(UINT8 ChipID, int clock);
10 |
11 | void device_stop_c6280(UINT8 ChipID);
12 |
13 | void device_reset_c6280(UINT8 ChipID);
14 |
15 | void c6280_set_emu_core(UINT8 Emulator);
16 |
17 | void c6280_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
18 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/dac_control.h:
--------------------------------------------------------------------------------
1 | void daccontrol_update(UINT8 ChipID, UINT32 samples);
2 |
3 | UINT8 device_start_daccontrol(UINT8 ChipID);
4 |
5 | void device_stop_daccontrol(UINT8 ChipID);
6 |
7 | void device_reset_daccontrol(UINT8 ChipID);
8 |
9 | void daccontrol_setup_chip(UINT8 ChipID, UINT8 ChType, UINT8 ChNum, UINT16 Command);
10 |
11 | void daccontrol_set_data(UINT8 ChipID, UINT8 *Data, UINT32 DataLen, UINT8 StepSize, UINT8 StepBase);
12 |
13 | void daccontrol_refresh_data(UINT8 ChipID, UINT8 *Data, UINT32 DataLen);
14 |
15 | void daccontrol_set_frequency(UINT8 ChipID, UINT32 Frequency);
16 |
17 | void daccontrol_start(UINT8 ChipID, UINT32 DataPos, UINT8 LenMode, UINT32 Length);
18 |
19 | void daccontrol_stop(UINT8 ChipID);
20 |
21 | #define DCTRL_LMODE_IGNORE 0x00
22 | #define DCTRL_LMODE_CMDS 0x01
23 | #define DCTRL_LMODE_MSEC 0x02
24 | #define DCTRL_LMODE_TOEND 0x03
25 | #define DCTRL_LMODE_BYTES 0x0F
26 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/emu2413_NESpatches.txt:
--------------------------------------------------------------------------------
1 | http://forums.nesdev.com/viewtopic.php?f=6&t=9141
2 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/emutypes.h:
--------------------------------------------------------------------------------
1 | #ifndef _EMUTYPES_H_
2 | #define _EMUTYPES_H_
3 |
4 | #ifndef INLINE
5 |
6 | #if defined(_MSC_VER)
7 | //#define INLINE __forceinline
8 | #define INLINE __inline
9 | #elif defined(__GNUC__)
10 | #define INLINE __inline__
11 | #elif defined(_MWERKS_)
12 | #define INLINE inline
13 | #else
14 | #define INLINE
15 | #endif
16 |
17 | #endif
18 |
19 | typedef unsigned int e_uint;
20 | typedef signed int e_int;
21 |
22 | typedef unsigned char e_uint8;
23 | typedef signed char e_int8;
24 |
25 | typedef unsigned short e_uint16;
26 | typedef signed short e_int16;
27 |
28 | typedef unsigned int e_uint32;
29 | typedef signed int e_int32;
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/es5503.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef __ES5503_H__
4 | #define __ES5503_H__
5 |
6 | ///#include "devlegcy.h"
7 |
8 | /*typedef struct _es5503_interface es5503_interface;
9 | struct _es5503_interface
10 | {
11 | void (*irq_callback)(running_device *device, int state);
12 | read8_device_func adc_read;
13 | UINT8 *wave_memory;
14 | };*/
15 |
16 | //READ8_DEVICE_HANDLER( es5503_r );
17 | //WRITE8_DEVICE_HANDLER( es5503_w );
18 | void es5503_w(UINT8 ChipID, offs_t offset, UINT8 data);
19 |
20 | UINT8 es5503_r(UINT8 ChipID, offs_t offset);
21 |
22 | void es5503_pcm_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
23 |
24 | int device_start_es5503(UINT8 ChipID, int clock, int channels);
25 |
26 | void device_stop_es5503(UINT8 ChipID);
27 |
28 | void device_reset_es5503(UINT8 ChipID);
29 | //void es5503_set_base(running_device *device, UINT8 *wavemem);
30 |
31 | void es5503_write_ram(UINT8 ChipID, offs_t DataStart, offs_t DataLength, const UINT8 *RAMData);
32 |
33 | void es5503_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
34 |
35 | void es5503_set_srchg_cb(UINT8 ChipID, SRATE_CALLBACK CallbackFunc, void *DataPtr);
36 |
37 | //DECLARE_LEGACY_SOUND_DEVICE(ES5503, es5503);
38 |
39 | #endif /* __ES5503_H__ */
40 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/gb.h:
--------------------------------------------------------------------------------
1 |
2 | /* Custom Sound Interface */
3 | UINT8 gb_wave_r(UINT8 ChipID, offs_t offset);
4 |
5 | void gb_wave_w(UINT8 ChipID, offs_t offset, UINT8 data);
6 |
7 | UINT8 gb_sound_r(UINT8 ChipID, offs_t offset);
8 |
9 | void gb_sound_w(UINT8 ChipID, offs_t offset, UINT8 data);
10 |
11 | void gameboy_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
12 |
13 | int device_start_gameboy_sound(UINT8 ChipID, int clock);
14 |
15 | void device_stop_gameboy_sound(UINT8 ChipID);
16 |
17 | void device_reset_gameboy_sound(UINT8 ChipID);
18 |
19 | void gameboy_sound_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
20 |
21 | void gameboy_sound_set_options(UINT8 Flags);
22 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/iremga20.h:
--------------------------------------------------------------------------------
1 | /*********************************************************
2 |
3 | Irem GA20 PCM Sound Chip
4 |
5 | *********************************************************/
6 | #pragma once
7 |
8 | #ifndef __IREMGA20_H__
9 | #define __IREMGA20_H__
10 |
11 | //#include "devlegcy.h"
12 |
13 | void IremGA20_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
14 |
15 | int device_start_iremga20(UINT8 ChipID, int clock);
16 |
17 | void device_stop_iremga20(UINT8 ChipID);
18 |
19 | void device_reset_iremga20(UINT8 ChipID);
20 |
21 | //WRITE8_DEVICE_HANDLER( irem_ga20_w );
22 | //READ8_DEVICE_HANDLER( irem_ga20_r );
23 | UINT8 irem_ga20_r(UINT8 ChipID, offs_t offset);
24 |
25 | void irem_ga20_w(UINT8 ChipID, offs_t offset, UINT8 data);
26 |
27 | void iremga20_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
28 | const UINT8 *ROMData);
29 |
30 | void iremga20_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
31 |
32 | //DECLARE_LEGACY_SOUND_DEVICE(IREMGA20, iremga20);
33 |
34 | #endif /* __IREMGA20_H__ */
35 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/k053260.h:
--------------------------------------------------------------------------------
1 | /*********************************************************
2 |
3 | Konami 053260 PCM/ADPCM Sound Chip
4 |
5 | *********************************************************/
6 |
7 | #pragma once
8 |
9 | //#include "devlegcy.h"
10 |
11 | /*typedef struct _k053260_interface k053260_interface;
12 | struct _k053260_interface {
13 | const char *rgnoverride;
14 | timer_expired_func irq; // called on SH1 complete cycle ( clock / 32 ) //
15 | };*/
16 |
17 |
18 | void k053260_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
19 |
20 | int device_start_k053260(UINT8 ChipID, int clock);
21 |
22 | void device_stop_k053260(UINT8 ChipID);
23 |
24 | void device_reset_k053260(UINT8 ChipID);
25 |
26 | //WRITE8_DEVICE_HANDLER( k053260_w );
27 | //READ8_DEVICE_HANDLER( k053260_r );
28 | void k053260_w(UINT8 ChipID, offs_t offset, UINT8 data);
29 |
30 | UINT8 k053260_r(UINT8 ChipID, offs_t offset);
31 |
32 | void k053260_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
33 | const UINT8 *ROMData);
34 |
35 | void k053260_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
36 |
37 | //DECLARE_LEGACY_SOUND_DEVICE(K053260, k053260);
38 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/multipcm.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | //#include "devlegcy.h"
4 |
5 | void MultiPCM_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
6 |
7 | int device_start_multipcm(UINT8 ChipID, int clock);
8 |
9 | void device_stop_multipcm(UINT8 ChipID);
10 |
11 | void device_reset_multipcm(UINT8 ChipID);
12 |
13 | //WRITE8_DEVICE_HANDLER( multipcm_w );
14 | //READ8_DEVICE_HANDLER( multipcm_r );
15 | void multipcm_w(UINT8 ChipID, offs_t offset, UINT8 data);
16 |
17 | UINT8 multipcm_r(UINT8 ChipID, offs_t offset);
18 |
19 | void multipcm_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
20 | const UINT8 *ROMData);
21 |
22 | //void multipcm_set_bank(running_device *device, UINT32 leftoffs, UINT32 rightoffs);
23 | void multipcm_set_bank(UINT8 ChipID, UINT32 leftoffs, UINT32 rightoffs);
24 |
25 | void multipcm_bank_write(UINT8 ChipID, UINT8 offset, UINT16 data);
26 |
27 | void multipcm_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
28 | //DECLARE_LEGACY_SOUND_DEVICE(MULTIPCM, multipcm);
29 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/nes_intf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | void nes_stream_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
4 |
5 | int device_start_nes(UINT8 ChipID, int clock);
6 |
7 | void device_stop_nes(UINT8 ChipID);
8 |
9 | void device_reset_nes(UINT8 ChipID);
10 |
11 | void nes_w(UINT8 ChipID, offs_t offset, UINT8 data);
12 |
13 | void nes_write_ram(UINT8 ChipID, offs_t DataStart, offs_t DataLength, const UINT8 *RAMData);
14 |
15 | void nes_set_emu_core(UINT8 Emulator);
16 |
17 | void nes_set_options(UINT16 Options);
18 |
19 | void nes_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
20 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/np_nes_apu.h:
--------------------------------------------------------------------------------
1 | void NES_APU_np_FrameSequence(void *chip, int s);
2 |
3 | void *NES_APU_np_Create(int clock, int rate);
4 |
5 | void NES_APU_np_Destroy(void *chip);
6 |
7 | void NES_APU_np_Reset(void *chip);
8 |
9 | bool NES_APU_np_Read(void *chip, UINT32 adr, UINT32 *val);
10 |
11 | bool NES_APU_np_Write(void *chip, UINT32 adr, UINT32 val);
12 |
13 | UINT32 NES_APU_np_Render(void *chip, INT32 b[2]);
14 |
15 | void NES_APU_np_SetRate(void *chip, double rate);
16 |
17 | void NES_APU_np_SetClock(void *chip, double clock);
18 |
19 | void NES_APU_np_SetOption(void *chip, int id, int b);
20 |
21 | void NES_APU_np_SetMask(void *chip, int m);
22 |
23 | void NES_APU_np_SetStereoMix(void *chip, int trk, INT16 mixl, INT16 mixr);
24 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/np_nes_dmc.h:
--------------------------------------------------------------------------------
1 | #ifndef _NP_NES_DMC_H_
2 | #define _NP_NES_DMC_H_
3 |
4 | void *NES_DMC_np_Create(int clock, int rate);
5 |
6 | void NES_DMC_np_Destroy(void *chip);
7 |
8 | void NES_DMC_np_Reset(void *chip);
9 |
10 | void NES_DMC_np_SetRate(void *chip, double rate);
11 |
12 | void NES_DMC_np_SetPal(void *chip, bool is_pal);
13 |
14 | void NES_DMC_np_SetAPU(void *chip, void *apu_);
15 |
16 | UINT32 NES_DMC_np_Render(void *chip, INT32 b[2]);
17 |
18 | void NES_DMC_np_SetMemory(void *chip, const UINT8 *r);
19 |
20 | bool NES_DMC_np_Write(void *chip, UINT32 adr, UINT32 val);
21 |
22 | bool NES_DMC_np_Read(void *chip, UINT32 adr, UINT32 *val);
23 |
24 | void NES_DMC_np_SetClock(void *chip, double rate);
25 |
26 | void NES_DMC_np_SetOption(void *chip, int id, int val);
27 |
28 | int NES_DMC_np_GetDamp(void *chip);
29 |
30 | void NES_DMC_np_SetMask(void *chip, int m);
31 |
32 | void NES_DMC_np_SetStereoMix(void *chip, int trk, INT16 mixl, INT16 mixr);
33 |
34 | #endif // _NP_NES_DMC_H_
35 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/np_nes_fds.h:
--------------------------------------------------------------------------------
1 | #ifndef _NP_NES_FDS_H_
2 | #define _NP_NES_FDS_H_
3 |
4 | void *NES_FDS_Create(int clock, int rate);
5 |
6 | void NES_FDS_Destroy(void *chip);
7 |
8 | void NES_FDS_Reset(void *chip);
9 |
10 | UINT32 NES_FDS_Render(void *chip, INT32 b[2]);
11 |
12 | bool NES_FDS_Write(void *chip, UINT32 adr, UINT32 val);
13 |
14 | bool NES_FDS_Read(void *chip, UINT32 adr, UINT32 *val);
15 |
16 | void NES_FDS_SetRate(void *chip, double r);
17 |
18 | void NES_FDS_SetClock(void *chip, double c);
19 |
20 | void NES_FDS_SetOption(void *chip, int id, int val);
21 |
22 | void NES_FDS_SetMask(void *chip, int m);
23 |
24 | void NES_FDS_SetStereoMix(void *chip, int trk, INT16 mixl, INT16 mixr);
25 |
26 | #endif // _NP_NES_FDS_H_
27 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/panning.h:
--------------------------------------------------------------------------------
1 | /*
2 | panning.h by Maxim in 2006
3 | Implements "simple equal power" panning using sine distribution
4 | I am not an expert on this stuff, but this is the best sounding of the methods I've tried
5 | */
6 |
7 | #ifndef PANNING_H
8 | #define PANNING_H
9 |
10 | void calc_panning(float channels[2], int position);
11 |
12 | void centre_panning(float channels[2]);
13 |
14 | #endif
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/qsound.h:
--------------------------------------------------------------------------------
1 | /*********************************************************
2 |
3 | Capcom Q-Sound system
4 |
5 | *********************************************************/
6 |
7 | #pragma once
8 |
9 | //#include "devlegcy.h"
10 |
11 | #define QSOUND_CLOCK 4000000 /* default 4MHz clock */
12 |
13 | void qsound_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
14 |
15 | int device_start_qsound(UINT8 ChipID, int clock);
16 |
17 | void device_stop_qsound(UINT8 ChipID);
18 |
19 | void device_reset_qsound(UINT8 ChipID);
20 |
21 |
22 | //WRITE8_DEVICE_HANDLER( qsound_w );
23 | //READ8_DEVICE_HANDLER( qsound_r );
24 | void qsound_w(UINT8 ChipID, offs_t offset, UINT8 data);
25 |
26 | UINT8 qsound_r(UINT8 ChipID, offs_t offset);
27 |
28 |
29 | void qsound_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
30 | const UINT8 *ROMData);
31 |
32 | void qsound_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
33 |
34 | //DECLARE_LEGACY_SOUND_DEVICE(QSOUND, qsound);
35 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/rf5c68.h:
--------------------------------------------------------------------------------
1 | /*********************************************************/
2 | /* ricoh RF5C68(or clone) PCM controller */
3 | /*********************************************************/
4 |
5 | #pragma once
6 |
7 | /******************************************/
8 | /*WRITE8_DEVICE_HANDLER( rf5c68_w );
9 |
10 | READ8_DEVICE_HANDLER( rf5c68_mem_r );
11 | WRITE8_DEVICE_HANDLER( rf5c68_mem_w );
12 |
13 | DEVICE_GET_INFO( rf5c68 );
14 | #define SOUND_RF5C68 DEVICE_GET_INFO_NAME( rf5c68 )*/
15 |
16 | void rf5c68_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
17 |
18 | int device_start_rf5c68(UINT8 ChipID, int clock);
19 |
20 | void device_stop_rf5c68(UINT8 ChipID);
21 |
22 | void device_reset_rf5c68(UINT8 ChipID);
23 |
24 | void rf5c68_w(UINT8 ChipID, offs_t offset, UINT8 data);
25 |
26 | UINT8 rf5c68_mem_r(UINT8 ChipID, offs_t offset);
27 |
28 | void rf5c68_mem_w(UINT8 ChipID, offs_t offset, UINT8 data);
29 |
30 | void rf5c68_write_ram(UINT8 ChipID, offs_t DataStart, offs_t DataLength, const UINT8 *RAMData);
31 |
32 | void rf5c68_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
33 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/saa1099.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef __SAA1099_H__
4 | #define __SAA1099_H__
5 |
6 | /**********************************************
7 | Philips SAA1099 Sound driver
8 | **********************************************/
9 |
10 | //WRITE8_DEVICE_HANDLER( saa1099_control_w );
11 | void saa1099_control_w(UINT8 ChipID, offs_t offset, UINT8 data);
12 |
13 | //WRITE8_DEVICE_HANDLER( saa1099_data_w );
14 | void saa1099_data_w(UINT8 ChipID, offs_t offset, UINT8 data);
15 |
16 | //DECLARE_LEGACY_SOUND_DEVICE(SAA1099, saa1099);
17 | void saa1099_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
18 |
19 | int device_start_saa1099(UINT8 ChipID, int clock);
20 |
21 | void device_stop_saa1099(UINT8 ChipID);
22 |
23 | void device_reset_saa1099(UINT8 ChipID);
24 |
25 | void saa1099_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
26 |
27 | #endif /* __SAA1099_H__ */
28 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/scspdsp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef __SCSPDSP_H__
4 | #define __SCSPDSP_H__
5 |
6 | //the DSP Context
7 | struct _SCSPDSP {
8 | //Config
9 | UINT16 *SCSPRAM;
10 | UINT32 SCSPRAM_LENGTH;
11 | UINT32 RBP; //Ring buf pointer
12 | UINT32 RBL; //Delay ram (Ring buffer) size in words
13 |
14 | //context
15 |
16 | INT16 COEF[64]; //16 bit signed
17 | UINT16 MADRS[32]; //offsets (in words), 16 bit
18 | UINT16 MPRO[128 * 4]; //128 steps 64 bit
19 | INT32 TEMP[128]; //TEMP regs,24 bit signed
20 | INT32 MEMS[32]; //MEMS regs,24 bit signed
21 | UINT32 DEC;
22 |
23 | //input
24 | INT32 MIXS[16]; //MIXS, 24 bit signed
25 | INT16 EXTS[2]; //External inputs (CDDA) 16 bit signed
26 |
27 | //output
28 | INT16 EFREG[16]; //EFREG, 16 bit signed
29 |
30 | int Stopped;
31 | int LastStep;
32 | };
33 |
34 | void SCSPDSP_Init(struct _SCSPDSP *DSP);
35 |
36 | void SCSPDSP_SetSample(struct _SCSPDSP *DSP, INT32 sample, INT32 SEL, INT32 MXL);
37 |
38 | void SCSPDSP_Step(struct _SCSPDSP *DSP);
39 |
40 | void SCSPDSP_Start(struct _SCSPDSP *DSP);
41 |
42 | #endif /* __SCSPDSP_H__ */
43 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/segapcm.h:
--------------------------------------------------------------------------------
1 | /*********************************************************/
2 | /* SEGA 8bit PCM */
3 | /*********************************************************/
4 |
5 | #pragma once
6 |
7 | #define BANK_256 (11)
8 | #define BANK_512 (12)
9 | #define BANK_12M (13)
10 | #define BANK_MASK7 (0x70<<16)
11 | #define BANK_MASKF (0xf0<<16)
12 | #define BANK_MASKF8 (0xf8<<16)
13 |
14 | typedef struct _sega_pcm_interface sega_pcm_interface;
15 | struct _sega_pcm_interface {
16 | int bank;
17 | };
18 |
19 | /*WRITE8_DEVICE_HANDLER( sega_pcm_w );
20 | READ8_DEVICE_HANDLER( sega_pcm_r );
21 |
22 | DEVICE_GET_INFO( segapcm );
23 | #define SOUND_SEGAPCM DEVICE_GET_INFO_NAME( segapcm )*/
24 |
25 | void SEGAPCM_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
26 |
27 | int device_start_segapcm(UINT8 ChipID, int clock, int intf_bank);
28 |
29 | void device_stop_segapcm(UINT8 ChipID);
30 |
31 | void device_reset_segapcm(UINT8 ChipID);
32 |
33 | void sega_pcm_w(UINT8 ChipID, offs_t offset, UINT8 data);
34 |
35 | UINT8 sega_pcm_r(UINT8 ChipID, offs_t offset);
36 |
37 | void sega_pcm_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
38 | const UINT8 *ROMData);
39 |
40 | void segapcm_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/sn764intf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | /*WRITE8_DEVICE_HANDLER( ym2413_w );
4 |
5 | WRITE8_DEVICE_HANDLER( ym2413_register_port_w );
6 | WRITE8_DEVICE_HANDLER( ym2413_data_port_w );
7 |
8 | DEVICE_GET_INFO( ym2413 );
9 | #define SOUND_YM2413 DEVICE_GET_INFO_NAME( ym2413 )*/
10 |
11 | void sn764xx_stream_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
12 |
13 | int device_start_sn764xx(UINT8 ChipID, int clock, int shiftregwidth, int noisetaps,
14 | int negate, int stereo, int clockdivider, int freq0);
15 |
16 | void device_stop_sn764xx(UINT8 ChipID);
17 |
18 | void device_reset_sn764xx(UINT8 ChipID);
19 |
20 | void sn764xx_w(UINT8 ChipID, offs_t offset, UINT8 data);
21 |
22 | void sn764xx_set_emu_core(UINT8 Emulator);
23 |
24 | void sn764xx_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
25 |
26 | void sn764xx_set_panning(UINT8 ChipID, INT16 *PanVals);
27 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/vrc7tone.h:
--------------------------------------------------------------------------------
1 | /* VRC7 VOICE */
2 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3 | 0x33, 0x01, 0x09, 0x0e, 0x94, 0x90, 0x40, 0x01,
4 | 0x13, 0x41, 0x0f, 0x0d, 0xce, 0xd3, 0x43, 0x13,
5 | 0x01, 0x12, 0x1b, 0x06, 0xff, 0xd2, 0x00, 0x32,
6 | 0x61, 0x61, 0x1b, 0x07, 0xaf, 0x63, 0x20, 0x28,
7 | 0x22, 0x21, 0x1e, 0x06, 0xf0, 0x76, 0x08, 0x28,
8 | 0x66, 0x21, 0x15, 0x00, 0x93, 0x94, 0x20, 0xf8,
9 | 0x21, 0x61, 0x1c, 0x07, 0x82, 0x81, 0x10, 0x17,
10 | 0x23, 0x21, 0x20, 0x1f, 0xc0, 0x71, 0x07, 0x47,
11 | 0x25, 0x31, 0x26, 0x05, 0x64, 0x41, 0x18, 0xf8,
12 | 0x17, 0x21, 0x28, 0x07, 0xff, 0x83, 0x02, 0xf8,
13 | 0x97, 0x81, 0x25, 0x07, 0xcf, 0xc8, 0x02, 0x14,
14 | 0x21, 0x21, 0x54, 0x0f, 0x80, 0x7f, 0x07, 0x07,
15 | 0x01, 0x01, 0x56, 0x03, 0xd3, 0xb2, 0x43, 0x58,
16 | 0x31, 0x21, 0x0c, 0x03, 0x82, 0xc0, 0x40, 0x07,
17 | 0x21, 0x01, 0x0c, 0x03, 0xd4, 0xd3, 0x40, 0x84,
18 | 0x04, 0x21, 0x28, 0x00, 0xdf, 0xf8, 0xff, 0xf8,
19 | 0x23, 0x22, 0x00, 0x00, 0xa8, 0xf8, 0xf8, 0xf8,
20 | 0x25, 0x18, 0x00, 0x00, 0xf8, 0xa9, 0xf8, 0x55,
21 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/vsu.h:
--------------------------------------------------------------------------------
1 | #ifndef __VB_VSU_H
2 | #define __VB_VSU_H
3 |
4 | void VSU_Write(UINT8 ChipID, UINT32 A, UINT8 V);
5 |
6 | void vsu_stream_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
7 |
8 | int device_start_vsu(UINT8 ChipID, int clock);
9 |
10 | void device_stop_vsu(UINT8 ChipID);
11 |
12 | void device_reset_vsu(UINT8 ChipID);
13 |
14 | //void vsu_set_options(UINT16 Options);
15 | void vsu_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
16 |
17 | #endif // __VB_VSU_H
18 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/ws_audio.h:
--------------------------------------------------------------------------------
1 | #ifndef __WS_AUDIO_H__
2 | #define __WS_AUDIO_H__
3 |
4 | int ws_audio_init(UINT8 ChipID, int clock);
5 |
6 | void ws_audio_reset(UINT8 ChipID);
7 |
8 | void ws_audio_done(UINT8 ChipID);
9 |
10 | void ws_audio_update(UINT8 ChipID, stream_sample_t **buffer, int length);
11 |
12 | void ws_audio_port_write(UINT8 ChipID, UINT8 port, UINT8 value);
13 |
14 | UINT8 ws_audio_port_read(UINT8 ChipID, UINT8 port);
15 |
16 | //void ws_audio_process(void);
17 | //void ws_audio_sounddma(void);
18 | void ws_write_ram(UINT8 ChipID, UINT16 offset, UINT8 value);
19 |
20 | void ws_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
21 | //extern int WaveAdrs;
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/x1_010.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef __X1_010_H__
4 | #define __X1_010_H__
5 |
6 | //#include "devlegcy.h"
7 |
8 |
9 | /*typedef struct _x1_010_interface x1_010_interface;
10 | struct _x1_010_interface
11 | {
12 | int adr; // address
13 | };*/
14 |
15 |
16 | void seta_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
17 |
18 | int device_start_x1_010(UINT8 ChipID, int clock);
19 |
20 | void device_stop_x1_010(UINT8 ChipID);
21 |
22 | void device_reset_x1_010(UINT8 ChipID);
23 |
24 | //READ8_DEVICE_HANDLER ( seta_sound_r );
25 | //WRITE8_DEVICE_HANDLER( seta_sound_w );
26 | UINT8 seta_sound_r(UINT8 ChipID, offs_t offset);
27 |
28 | void seta_sound_w(UINT8 ChipID, offs_t offset, UINT8 data);
29 |
30 | //READ16_DEVICE_HANDLER ( seta_sound_word_r );
31 | //WRITE16_DEVICE_HANDLER( seta_sound_word_w );
32 |
33 | //void seta_sound_enable_w(device_t *device, int data);
34 |
35 | void x1_010_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
36 | const UINT8 *ROMData);
37 |
38 | void x1_010_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
39 |
40 | //DECLARE_LEGACY_SOUND_DEVICE(X1_010, x1_010);
41 |
42 | #endif /* __X1_010_H__ */
43 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/ymf271.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | //#include "devcb.h"
4 |
5 | //typedef struct _ymf271_interface ymf271_interface;
6 | //struct _ymf271_interface
7 | //{
8 | // //devcb_read8 ext_read; /* external memory read */
9 | // //devcb_write8 ext_write; /* external memory write */
10 | // //void (*irq_callback)(const device_config *device, int state); /* irq callback */
11 | // void (*irq_callback)(int state); /* irq callback */
12 | //};
13 |
14 | /*READ8_DEVICE_HANDLER( ymf271_r );
15 | WRITE8_DEVICE_HANDLER( ymf271_w );
16 |
17 | DEVICE_GET_INFO( ymf271 );
18 | #define SOUND_YMF271 DEVICE_GET_INFO_NAME( ymf271 )*/
19 |
20 | void ymf271_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
21 |
22 | int device_start_ymf271(UINT8 ChipID, int clock);
23 |
24 | void device_stop_ymf271(UINT8 ChipID);
25 |
26 | void device_reset_ymf271(UINT8 ChipID);
27 |
28 | UINT8 ymf271_r(UINT8 ChipID, offs_t offset);
29 |
30 | void ymf271_w(UINT8 ChipID, offs_t offset, UINT8 data);
31 |
32 | void ymf271_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
33 | const UINT8 *ROMData);
34 |
35 | void ymf271_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
36 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/ymf278b.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define YMF278B_STD_CLOCK (33868800) /* standard clock for OPL4 */
4 |
5 |
6 | typedef struct _ymf278b_interface ymf278b_interface;
7 |
8 | struct _ymf278b_interface {
9 | //void (*irq_callback)(const device_config *device, int state); /* irq callback */
10 | void (*irq_callback)(int state); /* irq callback */
11 | };
12 |
13 | /*READ8_DEVICE_HANDLER( ymf278b_r );
14 | WRITE8_DEVICE_HANDLER( ymf278b_w );
15 |
16 | DEVICE_GET_INFO( ymf278b );
17 | #define SOUND_YMF278B DEVICE_GET_INFO_NAME( ymf278b )*/
18 |
19 | void ymf278b_pcm_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
20 |
21 | int device_start_ymf278b(UINT8 ChipID, int clock);
22 |
23 | void device_stop_ymf278b(UINT8 ChipID);
24 |
25 | void device_reset_ymf278b(UINT8 ChipID);
26 |
27 | UINT8 ymf278b_r(UINT8 ChipID, offs_t offset);
28 |
29 | void ymf278b_w(UINT8 ChipID, offs_t offset, UINT8 data);
30 |
31 | void ymf278b_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
32 | const UINT8 *ROMData);
33 |
34 | void ymf278b_set_mute_mask(UINT8 ChipID, UINT32 MuteMaskFM, UINT32 MuteMaskWT);
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/chips/ymz280b.h:
--------------------------------------------------------------------------------
1 | /**********************************************************************************************
2 | *
3 | * Yamaha YMZ280B driver
4 | * by Aaron Giles
5 | *
6 | **********************************************************************************************/
7 |
8 | #pragma once
9 |
10 | //#include "devcb.h"
11 |
12 | typedef struct _ymz280b_interface ymz280b_interface;
13 |
14 | struct _ymz280b_interface {
15 | //void (*irq_callback)(const device_config *device, int state); /* irq callback */
16 | void (*irq_callback)(int state); /* irq callback */
17 | //devcb_read8 ext_read; /* external RAM read */
18 | //devcb_write8 ext_write; /* external RAM write */
19 | };
20 |
21 | /*READ8_DEVICE_HANDLER ( ymz280b_r );
22 | WRITE8_DEVICE_HANDLER( ymz280b_w );
23 |
24 | DEVICE_GET_INFO( ymz280b );
25 | #define SOUND_YMZ280B DEVICE_GET_INFO_NAME( ymz280b )*/
26 |
27 | void ymz280b_update(UINT8 ChipID, stream_sample_t **outputs, int samples);
28 |
29 | int device_start_ymz280b(UINT8 ChipID, int clock);
30 |
31 | void device_stop_ymz280b(UINT8 ChipID);
32 |
33 | void device_reset_ymz280b(UINT8 ChipID);
34 |
35 | UINT8 ymz280b_r(UINT8 ChipID, offs_t offset);
36 |
37 | void ymz280b_w(UINT8 ChipID, offs_t offset, UINT8 data);
38 |
39 | void ymz280b_write_rom(UINT8 ChipID, offs_t ROMSize, offs_t DataStart, offs_t DataLength,
40 | const UINT8 *ROMData);
41 |
42 | void ymz280b_set_mute_mask(UINT8 ChipID, UINT32 MuteMask);
43 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/licenses/List.txt:
--------------------------------------------------------------------------------
1 | MAME - mame_license.txt
2 | DosBox - GPL.txt
3 | openMSX - GPL.txt
4 | Gens/GS - GPL.txt
5 | NSFPlay - [Google Code lists Apache License 2.0]
6 | Ootake - ?
7 | in_vgm - ?
8 | MEKA - ?
9 | zlib - see zlib.h
10 | in_wsr - ?
11 | vbjin/mednafen - GNU GPLv2
12 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/stdbool.h:
--------------------------------------------------------------------------------
1 | // custom stdbool.h to for 1-byte bool types
2 |
3 | #ifndef _CSTM_STDBOOL_H_
4 | #define _CSTM_STDBOOL_H_
5 |
6 | #ifndef __cplusplus // C++ already has the bool-type
7 |
8 | #define false 0x00
9 | #define true 0x01
10 |
11 | // the MS VC++ 6 compiler uses a one-byte-type (unsigned char, to be exact), so I'll reproduce this here
12 | typedef unsigned char bool;
13 |
14 | #endif // !__cplusplus
15 |
16 | #endif // !_CSTM_STDBOOL_H_
17 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/zlib/zdll.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/src/main/cpp/VGMPlay/zlib/zdll.lib
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/zlib/zlib.def:
--------------------------------------------------------------------------------
1 | LIBRARY
2 | ; zlib data compression library
3 |
4 | EXPORTS
5 | ; basic functions
6 | zlibVersion
7 | deflate
8 | deflateEnd
9 | inflate
10 | inflateEnd
11 | ; advanced functions
12 | deflateSetDictionary
13 | deflateCopy
14 | deflateReset
15 | deflateParams
16 | deflateTune
17 | deflateBound
18 | deflatePrime
19 | deflateSetHeader
20 | inflateSetDictionary
21 | inflateSync
22 | inflateCopy
23 | inflateReset
24 | inflateReset2
25 | inflatePrime
26 | inflateMark
27 | inflateGetHeader
28 | inflateBack
29 | inflateBackEnd
30 | zlibCompileFlags
31 | ; utility functions
32 | compress
33 | compress2
34 | compressBound
35 | uncompress
36 | gzopen
37 | gzdopen
38 | gzbuffer
39 | gzsetparams
40 | gzread
41 | gzwrite
42 | gzprintf
43 | gzputs
44 | gzgets
45 | gzputc
46 | gzgetc
47 | gzungetc
48 | gzflush
49 | gzseek
50 | gzrewind
51 | gztell
52 | gzoffset
53 | gzeof
54 | gzdirect
55 | gzclose
56 | gzclose_r
57 | gzclose_w
58 | gzerror
59 | gzclearerr
60 | ; checksum functions
61 | adler32
62 | crc32
63 | adler32_combine
64 | crc32_combine
65 | ; various hacks, don't look :)
66 | deflateInit_
67 | deflateInit2_
68 | inflateInit_
69 | inflateInit2_
70 | inflateBackInit_
71 | zError
72 | inflateSyncPoint
73 | get_crc_table
74 | inflateUndermine
75 |
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/zlib/zlib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/src/main/cpp/VGMPlay/zlib/zlib.lib
--------------------------------------------------------------------------------
/app/src/main/cpp/VGMPlay/zlib/zlibd.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/src/main/cpp/VGMPlay/zlib/zlibd.lib
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/Dual_Resampler.h:
--------------------------------------------------------------------------------
1 | // Combination of Fir_Resampler and Blip_Buffer mixing. Used by Sega FM emulators.
2 |
3 | // Game_Music_Emu 0.6.0
4 | #ifndef DUAL_RESAMPLER_H
5 | #define DUAL_RESAMPLER_H
6 |
7 | #include "Fir_Resampler.h"
8 | #include "Blip_Buffer.h"
9 |
10 | class Dual_Resampler {
11 | public:
12 | Dual_Resampler();
13 | virtual ~Dual_Resampler();
14 |
15 | typedef short dsample_t;
16 |
17 | double setup( double oversample, double rolloff, double gain );
18 | blargg_err_t reset( int max_pairs );
19 | void resize( int pairs_per_frame );
20 | void clear();
21 |
22 | void dual_play( long count, dsample_t* out, Blip_Buffer& );
23 |
24 | protected:
25 | virtual int play_frame( blip_time_t, int pcm_count, dsample_t* pcm_out ) = 0;
26 | private:
27 |
28 | blargg_vector sample_buf;
29 | int sample_buf_size;
30 | int oversamples_per_frame;
31 | int buf_pos;
32 | int resampler_size;
33 |
34 | Fir_Resampler<12> resampler;
35 | void mix_samples( Blip_Buffer&, dsample_t* );
36 | void play_frame_( Blip_Buffer&, dsample_t* );
37 | };
38 |
39 | inline double Dual_Resampler::setup( double oversample, double rolloff, double gain )
40 | {
41 | return resampler.time_ratio( oversample, rolloff, gain * 0.5 );
42 | }
43 |
44 | inline void Dual_Resampler::clear()
45 | {
46 | buf_pos = sample_buf_size;
47 | resampler.clear();
48 | }
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/Sms_Oscs.h:
--------------------------------------------------------------------------------
1 | // Private oscillators used by Sms_Apu
2 |
3 | // Sms_Snd_Emu 0.1.4
4 | #ifndef SMS_OSCS_H
5 | #define SMS_OSCS_H
6 |
7 | #include "blargg_common.h"
8 | #include "Blip_Buffer.h"
9 |
10 | struct Sms_Osc
11 | {
12 | Blip_Buffer* outputs [4]; // NULL, right, left, center
13 | Blip_Buffer* output;
14 | int output_select;
15 |
16 | int delay;
17 | int last_amp;
18 | int volume;
19 |
20 | Sms_Osc();
21 | void reset();
22 | };
23 |
24 | struct Sms_Square : Sms_Osc
25 | {
26 | int period;
27 | int phase;
28 |
29 | typedef Blip_Synth Synth;
30 | const Synth* synth;
31 |
32 | void reset();
33 | void run( blip_time_t, blip_time_t );
34 | };
35 |
36 | struct Sms_Noise : Sms_Osc
37 | {
38 | const int* period;
39 | unsigned shifter;
40 | unsigned feedback;
41 |
42 | typedef Blip_Synth Synth;
43 | Synth synth;
44 |
45 | void reset();
46 | void run( blip_time_t, blip_time_t );
47 | };
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/Spc_Filter.h:
--------------------------------------------------------------------------------
1 | // Simple low-pass and high-pass filter to better match sound output of a SNES
2 |
3 | // Game_Music_Emu 0.6.0
4 | #ifndef SPC_FILTER_H
5 | #define SPC_FILTER_H
6 |
7 | #include "blargg_common.h"
8 |
9 | struct SPC_Filter {
10 | public:
11 |
12 | // Filters count samples of stereo sound in place. Count must be a multiple of 2.
13 | typedef short sample_t;
14 | void run( sample_t* io, int count );
15 |
16 | // Optional features
17 |
18 | // Clears filter to silence
19 | void clear();
20 |
21 | // Sets gain (volume), where gain_unit is normal. Gains greater than gain_unit
22 | // are fine, since output is clamped to 16-bit sample range.
23 | enum { gain_unit = 0x100 };
24 | void set_gain( int gain );
25 |
26 | // Enables/disables filtering (when disabled, gain is still applied)
27 | void enable( bool b );
28 |
29 | // Sets amount of bass (logarithmic scale)
30 | enum { bass_none = 0 };
31 | enum { bass_norm = 8 }; // normal amount
32 | enum { bass_max = 31 };
33 | void set_bass( int bass );
34 |
35 | public:
36 | SPC_Filter();
37 | BLARGG_DISABLE_NOTHROW
38 | private:
39 | enum { gain_bits = 8 };
40 | int gain;
41 | int bass;
42 | bool enabled;
43 | struct chan_t { int p1, pp1, sum; };
44 | chan_t ch [2];
45 | };
46 |
47 | inline void SPC_Filter::enable( bool b ) { enabled = b; }
48 |
49 | inline void SPC_Filter::set_gain( int g ) { gain = g; }
50 |
51 | inline void SPC_Filter::set_bass( int b ) { bass = b; }
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/Ym2413_Emu.cpp:
--------------------------------------------------------------------------------
1 |
2 | // Use in place of Ym2413_Emu.cpp and ym2413.c to disable support for this chip
3 |
4 | // Game_Music_Emu 0.6.0. http://www.slack.net/~ant/
5 |
6 | #include "Ym2413_Emu.h"
7 |
8 | Ym2413_Emu::Ym2413_Emu() { }
9 |
10 | Ym2413_Emu::~Ym2413_Emu() { }
11 |
12 | int Ym2413_Emu::set_rate( double, double ) { return 2; }
13 |
14 | void Ym2413_Emu::reset() { }
15 |
16 | void Ym2413_Emu::write( int, int ) { }
17 |
18 | void Ym2413_Emu::mute_voices( int ) { }
19 |
20 | void Ym2413_Emu::run( int, sample_t* ) { }
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/Ym2413_Emu.h:
--------------------------------------------------------------------------------
1 | // YM2413 FM sound chip emulator interface
2 |
3 | // Game_Music_Emu 0.6.0
4 | #ifndef YM2413_EMU_H
5 | #define YM2413_EMU_H
6 |
7 | class Ym2413_Emu {
8 | struct OPLL* opll;
9 | public:
10 | Ym2413_Emu();
11 | ~Ym2413_Emu();
12 |
13 | // Set output sample rate and chip clock rates, in Hz. Returns non-zero
14 | // if error.
15 | int set_rate( double sample_rate, double clock_rate );
16 |
17 | // Reset to power-up state
18 | void reset();
19 |
20 | // Mute voice n if bit n (1 << n) of mask is set
21 | enum { channel_count = 14 };
22 | void mute_voices( int mask );
23 |
24 | // Write 'data' to 'addr'
25 | void write( int addr, int data );
26 |
27 | // Run and write pair_count samples to output
28 | typedef short sample_t;
29 | enum { out_chan_count = 2 }; // stereo
30 | void run( int pair_count, sample_t* out );
31 | };
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/Ym2612_Emu.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/src/main/cpp/gme/Ym2612_Emu.cpp
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/Ym2612_Emu.h:
--------------------------------------------------------------------------------
1 | // YM2612 FM sound chip emulator interface
2 |
3 | // Game_Music_Emu 0.6.0
4 | #ifndef YM2612_EMU_H
5 | #define YM2612_EMU_H
6 |
7 | struct Ym2612_Impl;
8 |
9 | class Ym2612_Emu {
10 | Ym2612_Impl* impl;
11 | public:
12 | Ym2612_Emu() { impl = 0; }
13 | ~Ym2612_Emu();
14 |
15 | // Set output sample rate and chip clock rates, in Hz. Returns non-zero
16 | // if error.
17 | const char* set_rate( double sample_rate, double clock_rate );
18 |
19 | // Reset to power-up state
20 | void reset();
21 |
22 | // Mute voice n if bit n (1 << n) of mask is set
23 | enum { channel_count = 6 };
24 | void mute_voices( int mask );
25 |
26 | // Write addr to register 0 then data to register 1
27 | void write0( int addr, int data );
28 |
29 | // Write addr to register 2 then data to register 3
30 | void write1( int addr, int data );
31 |
32 | // Run and add pair_count samples into current output buffer contents
33 | typedef short sample_t;
34 | enum { out_chan_count = 2 }; // stereo
35 | void run( int pair_count, sample_t* out );
36 | };
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/blargg_config.h:
--------------------------------------------------------------------------------
1 | // Library configuration. Modify this file as necessary.
2 |
3 | #ifndef BLARGG_CONFIG_H
4 | #define BLARGG_CONFIG_H
5 |
6 | // Uncomment to use zlib for transparent decompression of gzipped files
7 | #define HAVE_ZLIB_H
8 |
9 | // Uncomment and edit list to support only the listed game music types,
10 | // so that the others don't get linked in at all.
11 | /*
12 | #define GME_TYPE_LIST \
13 | gme_ay_type,\
14 | gme_gbs_type,\
15 | gme_gym_type,\
16 | gme_hes_type,\
17 | gme_kss_type,\
18 | gme_nsf_type,\
19 | gme_nsfe_type,\
20 | gme_sap_type,\
21 | gme_spc_type,\
22 | gme_vgm_type,\
23 | gme_vgz_type
24 | */
25 |
26 | // Uncomment to enable platform-specific optimizations
27 | //#define BLARGG_NONPORTABLE 1
28 |
29 | // Uncomment to use faster, lower quality sound synthesis
30 | //#define BLIP_BUFFER_FAST 1
31 |
32 | // Uncomment if automatic byte-order determination doesn't work
33 | //#define BLARGG_BIG_ENDIAN 1
34 |
35 | // Uncomment if you get errors in the bool section of blargg_common.h
36 | //#define BLARGG_COMPILER_HAS_BOOL 1
37 |
38 | // Use standard config.h if present
39 | #ifdef HAVE_CONFIG_H
40 | #include "config.h"
41 | #endif
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/libgme.pc.in:
--------------------------------------------------------------------------------
1 | # entries grouped with CMake are expanded by CMake
2 | # ${foo} entries are left alone by CMake and much
3 | # later are used by pkg-config.
4 | prefix=@CMAKE_INSTALL_PREFIX@
5 | exec_prefix=${prefix}
6 | lib_suffix=@LIB_SUFFIX@
7 | libdir=${exec_prefix}/lib${lib_suffix}
8 | includedir=${prefix}/include
9 |
10 | Name: Game_Music_Emu
11 | Description: A video game emulation library for music.
12 | URL: http://code.google.com/p/game-music-emu/
13 | Version: @GME_VERSION@
14 | Cflags: -I${includedir}
15 | Libs: -L${libdir} -lgme
16 |
--------------------------------------------------------------------------------
/app/src/main/cpp/gme/sap_cpu_io.h:
--------------------------------------------------------------------------------
1 |
2 | #include "Sap_Emu.h"
3 |
4 | #include "blargg_source.h"
5 |
6 | #define CPU_WRITE( cpu, addr, data, time ) STATIC_CAST(Sap_Emu&,*cpu).cpu_write( addr, data )
7 |
8 | void Sap_Emu::cpu_write( sap_addr_t addr, int data )
9 | {
10 | mem.ram [addr] = data;
11 | if ( (addr >> 8) == 0xD2 )
12 | cpu_write_( addr, data );
13 | }
14 |
15 | #ifdef NDEBUG
16 | #define CPU_READ( cpu, addr, time ) READ_LOW( addr )
17 | #else
18 | #define CPU_READ( cpu, addr, time ) STATIC_CAST(Sap_Emu&,*cpu).cpu_read( addr )
19 |
20 | int Sap_Emu::cpu_read( sap_addr_t addr )
21 | {
22 | if ( (addr & 0xF900) == 0xD000 )
23 | debug_printf( "Unmapped read $%04X\n", addr );
24 | return mem.ram [addr];
25 | }
26 | #endif
27 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/.gitattributes:
--------------------------------------------------------------------------------
1 | *.ac text eol=lf
2 | *.am text eol=lf
3 | *.m4 text eol=lf
4 | *.pc text eol=lf
5 | *.spec text eol=lf
6 | *.sh text eol=lf
7 |
8 | *.bat text eol=crlf
9 | *.def text eol=crlf
10 | *.msvc text eol=crlf
11 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/.gitignore:
--------------------------------------------------------------------------------
1 | # *.cm* # This line is broken it matches all files.
2 | *.dat
3 | *.gz
4 | *.la
5 | *.lo
6 | *.mat
7 | *.o
8 | *.s
9 | *.wav
10 | .depend
11 | .deps
12 | .libs
13 | build-aux/
14 | Hack
15 | Images
16 | m4/libtool.m4
17 | m4/ltoptions.m4
18 | m4/ltsugar.m4
19 | m4/ltversion.m4
20 | m4/lt~obsolete.m4
21 | Makefile
22 | Makefile.in
23 | Octave/*.h
24 | Octave/make_quad_filter
25 | Octave/make_src_filter
26 | Win32/Makefile.mingw
27 | aclocal.m4
28 | autom4te.cache
29 | libsamplerate-*.tar.bz2
30 | compile
31 | config.*
32 | !/config.h.in
33 | configure
34 | depcomp
35 | doc/ChangeLog
36 | doc/NEWS
37 | examples/sndfile-resample
38 | examples/timewarp-file
39 | examples/varispeed-play
40 | install-sh
41 | libsamplerate.spec
42 | libtool
43 | localinstall.py
44 | ltmain.sh
45 | missing
46 | samplerate.pc
47 | src/Version_script
48 | src/config.h
49 | src/config.h.in
50 | stamp-h1
51 | .dirstamp
52 | tests/*_test
53 | tests/benchmark
54 | tests/src-evaluate
55 | *.log
56 | *.trs
57 | build/
58 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/.travis.yml:
--------------------------------------------------------------------------------
1 | language: c
2 |
3 | sudo: required
4 | dist: trusty
5 |
6 | before_install:
7 | - sudo add-apt-repository ppa:ondrej/autotools -y # automake 1.15
8 | - sudo add-apt-repository ppa:cz.nic-labs/knot-dns -y # pkg-config 0.29.2
9 | - sudo apt-get update
10 | - sudo apt-get install -y autoconf automake-1.15 pkg-config m4 libsndfile-dev libfftw3-dev libasound2-dev
11 |
12 | env:
13 | - AUTOGEN=true CMAKE_SHARED=OFF
14 | - AUTOGEN=false CMAKE_SHARED=ON
15 |
16 | script:
17 | - if $AUTOGEN; then ./autogen.sh && ./configure --enable-sndfile --enable-alsa && make distcheck; fi
18 | - mkdir build
19 | - cd build
20 | - cmake -DBUILD_SHARED_LIBS=$CMAKE_SHARED ..
21 | - cat config.h
22 | - make
23 | - make test
24 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/AUTHORS:
--------------------------------------------------------------------------------
1 | Erik de Castro Lopo
2 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/COPYING:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012-2016, Erik de Castro Lopo
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | 1. Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in the
13 | documentation and/or other materials provided with the distribution.
14 |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
16 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
18 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/Make.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | if "%1"=="check" GOTO CHECK
4 | if "%1"=="clean" GOTO CLEAN
5 |
6 | copy /y Win32\config.h src\config.h
7 | copy /y Win32\unistd.h examples\unistd.h
8 |
9 | nmake -f Win32\Makefile.msvc
10 | goto END
11 |
12 |
13 | :CHECK
14 | nmake -f Win32\Makefile.msvc check
15 | goto END
16 |
17 | :CLEAN
18 | nmake -f Win32\Makefile.msvc clean
19 | goto END
20 |
21 | :END
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/NEWS:
--------------------------------------------------------------------------------
1 | Version 0.1.9 (2016-09-23)
2 | * Relicense under 2 clause BSD license.
3 | * Minor bug fixes and upates.
4 |
5 | Version 0.1.8 (2011-08-15)
6 | * Minor bug fixes and upates.
7 |
8 | Version 0.1.7 (2009-02-14)
9 | * Fix a segfault which occurs when memcpy is passed a bad length parameter.
10 | * Fix compilation under MSVC.
11 |
12 | Version 0.1.6 (2009-01-27)
13 | * Minor bug fix in test suite (account for rounding error on x86_64).
14 |
15 | Version 0.1.5 (2009-01-11)
16 | * Optimisation resulting dramatic throughput improvements.
17 |
18 | Version 0.1.4 (2008-07-02)
19 | * Fix bug which causes a segfault with extremely low conversion ratios.
20 |
21 | Version 0.1.3 (2008-03-23)
22 | * Huge improvement to the quality of conversion with the
23 | SRC_SINC_MEDIUM_QUALITY and SRC_SINC_BEST_QUALITY converters.
24 | * Minor bug fixes.
25 |
26 | Version 0.1.2 (2004-09-12)
27 | * Fixed where callback based API wasn't being reset properly.
28 | * Minor bug fixes.
29 |
30 | Version 0.1.1 (2004-07-17)
31 | * Fixed bug in callback based API.
32 | * Fixed a bug brought to light by aggressive optimisations of gcc-3.4.
33 | * Minor bug fixes.
34 |
35 | Version 0.1.0 (2004-03-14)
36 | * Added callback based API.
37 | * Added a pair of functions for doing short to float and float to short
38 | conversions on an arrays of data.
39 | * Many minor bug fixes.
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/Win32/libsamplerate-0.def:
--------------------------------------------------------------------------------
1 | LIBRARY libsamplerate-0.dll
2 | EXPORTS
3 |
4 | src_new @1
5 | src_delete @2
6 |
7 | src_get_name @10
8 | src_get_description @11
9 | src_get_version @12
10 |
11 | src_process @20
12 | src_reset @21
13 | src_set_ratio @22
14 | src_clone @23
15 |
16 | src_error @30
17 | src_strerror @31
18 |
19 | src_simple @40
20 |
21 | src_is_valid_ratio @50
22 |
23 | src_callback_new @60
24 | src_callback_read @61
25 |
26 | src_short_to_float_array @70
27 | src_float_to_short_array @71
28 | src_int_to_float_array @80
29 | src_float_to_int_array @81
30 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/Win32/unistd.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** Copyright (c) 2002-2016, Erik de Castro Lopo
3 | ** All rights reserved.
4 | **
5 | ** This code is released under 2-clause BSD license. Please see the
6 | ** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
7 | */
8 |
9 | /*
10 | ** Emtpy file to prevent Win32 compiler from complaining that the
11 | ** file doesn't exist.
12 | */
13 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/cmake/FindSndfile.cmake:
--------------------------------------------------------------------------------
1 | # Variables defined:
2 | # SNDFILE_FOUND
3 | # SNDFILE_INCLUDE_DIR
4 | # SNDFILE_LIBRARY
5 | #
6 | # Environment variables used:
7 | # SNDFILE_ROOT
8 |
9 | find_path(SNDFILE_INCLUDE_DIR sndfile.h
10 | HINTS $ENV{SNDFILE_ROOT}/include)
11 |
12 | find_library(SNDFILE_LIBRARY NAMES sndfile
13 | HINTS $ENV{SNDFILE_ROOT}/lib)
14 |
15 | include(FindPackageHandleStandardArgs)
16 | find_package_handle_standard_args(SNDFILE DEFAULT_MSG SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
17 |
18 | mark_as_advanced(SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
19 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/doc/SRC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/src/main/cpp/libsamplerate/doc/SRC.png
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/doc/foo_dsp_src9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/src/main/cpp/libsamplerate/doc/foo_dsp_src9.png
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/doc/paypal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/src/main/cpp/libsamplerate/doc/paypal.png
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/examples/audio_out.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** Copyright (c) 1999-2016, Erik de Castro Lopo
3 | ** All rights reserved.
4 | **
5 | ** This code is released under 2-clause BSD license. Please see the
6 | ** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
7 | */
8 |
9 | typedef struct AUDIO_OUT AUDIO_OUT ;
10 |
11 | typedef int (*get_audio_callback_t) (void *callback_data, float *samples, int frames) ;
12 |
13 | /* A general audio output function (Linux/ALSA, Linux/OSS, Win32, MacOSX,
14 | ** Solaris) which retrieves data using the callback function in the above
15 | ** struct.
16 | **
17 | ** audio_open - opens the device and returns an anonymous pointer to its
18 | ** own private data.
19 | */
20 |
21 | AUDIO_OUT *audio_open (int channels, int samplerate) ;
22 |
23 | void audio_play (get_audio_callback_t callback, AUDIO_OUT *audio_out, void *callback_data) ;
24 |
25 | void audio_close (AUDIO_OUT *audio_data) ;
26 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/m4/ax_require_defined.m4:
--------------------------------------------------------------------------------
1 | # ===========================================================================
2 | # https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
3 | # ===========================================================================
4 | #
5 | # SYNOPSIS
6 | #
7 | # AX_REQUIRE_DEFINED(MACRO)
8 | #
9 | # DESCRIPTION
10 | #
11 | # AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
12 | # been defined and thus are available for use. This avoids random issues
13 | # where a macro isn't expanded. Instead the configure script emits a
14 | # non-fatal:
15 | #
16 | # ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
17 | #
18 | # It's like AC_REQUIRE except it doesn't expand the required macro.
19 | #
20 | # Here's an example:
21 | #
22 | # AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
23 | #
24 | # LICENSE
25 | #
26 | # Copyright (c) 2014 Mike Frysinger
27 | #
28 | # Copying and distribution of this file, with or without modification, are
29 | # permitted in any medium without royalty provided the copyright notice
30 | # and this notice are preserved. This file is offered as-is, without any
31 | # warranty.
32 |
33 | #serial 2
34 |
35 | AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
36 | m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
37 | ])dnl AX_REQUIRE_DEFINED
38 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/m4/check_signal.m4:
--------------------------------------------------------------------------------
1 | dnl @synopsis AC_CHECK_SIGNAL(SIGNAME)
2 | dnl
3 | dnl
4 | dnl @category C
5 | dnl @author Erik de Castro Lopo
6 | dnl @version 1.0 Jul 07 2007
7 |
8 | AC_DEFUN([AC_CHECK_SIGNAL],
9 | [AC_CACHE_CHECK(for $1,
10 | ac_cv_signal_$1,
11 | [
12 | AC_TRY_LINK([
13 | #include
14 |
15 | ], signal($1, SIG_DFL) ;, ac_cv_signal_$1=yes, ac_cv_signal_$1=no)
16 |
17 | ])
18 |
19 | if test "$ac_cv_signal_$1" = yes; then
20 | AC_DEFINE(HAVE_$1, 1,
21 | [Define if you have signal $1.])
22 | fi
23 | ])# AC_CHECK_SIGNAL
24 |
25 |
26 | ## AC_CHECK_SIGNALS
27 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/samplerate.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@prefix@
2 | exec_prefix=@exec_prefix@
3 | libdir=@libdir@
4 | includedir=@includedir@
5 |
6 | Name: samplerate
7 | Description: An audio Sample Rate Conversion library
8 | Requires:
9 | Version: @VERSION@
10 | Libs: -L${libdir} -lsamplerate
11 | Libs.private: @LIBS@
12 | Cflags: -I${includedir}
13 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/src/Version_script.in:
--------------------------------------------------------------------------------
1 | #
2 | # Export file for libsamplerate
3 | #
4 | # Only the symbols listed in the global section will be callable from
5 | # applications linking to libsamplerate.
6 | #
7 |
8 | @PACKAGE@.so.0.0
9 | {
10 | global:
11 | src_new ;
12 | src_delete ;
13 | src_get_name ;
14 | src_get_description ;
15 | src_get_version ;
16 | src_process ;
17 | src_reset ;
18 | src_error ;
19 | src_strerror ;
20 | src_simple ;
21 | src_is_valid_ratio ;
22 | src_set_ratio ;
23 |
24 | local:
25 | *;
26 | };
27 |
28 | @PACKAGE@.so.0.1
29 | {
30 | global:
31 | src_callback_new ;
32 | src_callback_read ;
33 |
34 | src_short_to_float_array ;
35 | src_float_to_short_array ;
36 | src_int_to_float_array ;
37 | src_float_to_int_array ;
38 | src_get_channels ;
39 | } @PACKAGE@.so.0.0;
40 |
41 | @PACKAGE@.so.0.2
42 | {
43 | global:
44 | src_clone ;
45 | } @PACKAGE@.so.0.1;
46 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/tests/downsample_test.c:
--------------------------------------------------------------------------------
1 | /*
2 | ** Copyright (c) 2008-2016, Erik de Castro Lopo
3 | ** All rights reserved.
4 | **
5 | ** This code is released under 2-clause BSD license. Please see the
6 | ** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
7 | */
8 |
9 | #include
10 | #include
11 | #include
12 |
13 | #include "util.h"
14 |
15 | static void
16 | downsample_test (int converter)
17 | { static float in [1000], out [10] ;
18 | SRC_DATA data ;
19 |
20 | printf (" downsample_test (%-28s) ....... ", src_get_name (converter)) ;
21 | fflush (stdout) ;
22 |
23 | data.src_ratio = 1.0 / 255.0 ;
24 | data.input_frames = ARRAY_LEN (in) ;
25 | data.output_frames = ARRAY_LEN (out) ;
26 | data.data_in = in ;
27 | data.data_out = out ;
28 |
29 | if (src_simple (&data, converter, 1))
30 | { puts ("src_simple failed.") ;
31 | exit (1) ;
32 | } ;
33 |
34 | puts ("ok") ;
35 | } /* downsample_test */
36 |
37 | int
38 | main (void)
39 | {
40 | puts ("") ;
41 |
42 | downsample_test (SRC_ZERO_ORDER_HOLD) ;
43 | downsample_test (SRC_LINEAR) ;
44 | downsample_test (SRC_SINC_FASTEST) ;
45 | downsample_test (SRC_SINC_MEDIUM_QUALITY) ;
46 | downsample_test (SRC_SINC_BEST_QUALITY) ;
47 |
48 | puts ("") ;
49 |
50 | return 0 ;
51 | } /* main */
52 |
--------------------------------------------------------------------------------
/app/src/main/cpp/libsamplerate/tests/util.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** Copyright (c) 2002-2016, Erik de Castro Lopo
3 | ** All rights reserved.
4 | **
5 | ** This code is released under 2-clause BSD license. Please see the
6 | ** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
7 | */
8 |
9 | #include "config.h"
10 |
11 | #define ABS(a) (((a) < 0) ? - (a) : (a))
12 | #define MIN(a,b) (((a) < (b)) ? (a) : (b))
13 | #define MAX(a,b) (((a) >= (b)) ? (a) : (b))
14 |
15 | #define ARRAY_LEN(x) ((int) (sizeof (x) / sizeof ((x) [0])))
16 |
17 | void gen_windowed_sines (int freq_count, const double *freqs, double max, float *output, int output_len) ;
18 |
19 | void save_oct_float (char *filename, float *input, int in_len, float *output, int out_len) ;
20 | void save_oct_double (char *filename, double *input, int in_len, double *output, int out_len) ;
21 |
22 | void interleave_data (const float *in, float *out, int frames, int channels) ;
23 |
24 | void deinterleave_data (const float *in, float *out, int frames, int channels) ;
25 |
26 | void reverse_data (float *data, int datalen) ;
27 |
28 | double calculate_snr (float *data, int len, int expected_peaks) ;
29 |
30 | const char * get_cpu_name (void) ;
31 |
32 | #if OS_IS_WIN32
33 | /*
34 | ** Extra Win32 hacks.
35 | **
36 | ** Despite Microsoft claim of windows being POSIX compatibile it has '_sleep'
37 | ** instead of 'sleep'.
38 | */
39 |
40 | #define sleep _sleep
41 | #endif
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # List of source files required by libpsf and any emulators
2 |
3 | set(libpsf_SRCS PsxBios.c
4 | PsxCounters.c
5 | PsxDma.c
6 | Spu.c
7 | PsxHw.c
8 | PsxMem.c
9 | Misc.c
10 | R3000A.c
11 | PsxInterpreter.c
12 | PsxHLE.c
13 | spu/spu.c
14 | android/Backend.cpp)
15 |
16 | # Add library to be compiled.
17 | add_library(psf SHARED ${libpsf_SRCS})
18 |
19 | # Not sure what most of this means, but apparently it links to "android.h", "zlib.h" and "log.h"
20 | if (ANDROID)
21 | target_link_libraries(psf
22 | samplerate
23 | log
24 | android
25 | z
26 | "-Wl,--no-warn-mismatch"
27 | "-Wl,--whole-archive"
28 | ${LIBS}
29 | "-Wl,--no-whole-archive"
30 | )
31 | endif ()
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/Docs/README:
--------------------------------------------------------------------------------
1 | This is sexyPSF, based off of pcsx and peops.
2 |
3 | To compile, go to the main directory, and type "make", if you're
4 | running on an x86(IA32) system.
5 | If you want to compile for a generic LSB-first(ARM, IA32, AMD64, etc.), do
6 | "make CPU=LSBFIRST". For a generic MSB-first(PowerPC) platform,
7 | do "make CPU=MSBFIRST".
8 |
9 | You can then do "make install" to install it to ~/.xmms/Plugins
10 |
11 | (Replace "make" with "gmake" if necessary in the above commands)
12 |
13 | You need to have zlib installed, as well as the xmms plugin header file(s).
14 |
15 | ***** IMPORTANT *****
16 | The minimum CPU this will run on at real time is probably a Pentium MMX
17 | 200MHz CPU.
18 | You should change the "-mcpu=i686" string in the makefile, if necessary,
19 | to better suit your processor. This may be *necessary* for correct code
20 | generation on your platform in certain cases. For example, if you're using
21 | a Pentium 1, just have "-mcpu=i586".
22 |
23 | There might be exploitable bugs in the emulation and PSF loading code. I know
24 | there are bugs that can cause a segmentation fault for deferencing NULL
25 | pointers, in the emulation code. To be most safe, only play PSFs from trusted
26 | sources(and trusted rippers).
27 |
28 | ***** END IMPORTANT ****
29 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/Docs/TODO:
--------------------------------------------------------------------------------
1 | - Something?
2 |
3 | The old TODO list that I(xodnizel) will be unable to do:
4 |
5 | - Implement filter to match frequency response of a real PSX, and maybe
6 | do compression.
7 | - Reorganize source code tree, and add PSF2 support.
8 | - Add support for the "volume" PSF tag? Maybe, but I don't think it's very useful...
9 | - Add configuration, file info, about dialogs. A GTK+2 version of xmms would
10 | be nice...bah.
11 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/Misc.h:
--------------------------------------------------------------------------------
1 | /* Pcsx - Pc Psx Emulator
2 | * Copyright (C) 1999-2002 Pcsx Team
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 | */
18 |
19 | #ifndef __MISC_H__
20 | #define __MISC_H__
21 |
22 | typedef struct AudioBuffer {
23 | uint8_t *contents;
24 | uint32_t length_in_bytes;
25 | } AudioBuffer;
26 |
27 | #endif /* __MISC_H__ */
28 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/PsxBios.h:
--------------------------------------------------------------------------------
1 | /* Pcsx - Pc Psx Emulator
2 | * Copyright (C) 1999-2002 Pcsx Team
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 | */
18 |
19 | #ifndef __PSXBIOS_H__
20 | #define __PSXBIOS_H__
21 |
22 | extern char *biosA0n[256];
23 | extern char *biosB0n[256];
24 | extern char *biosC0n[256];
25 |
26 | void psxBiosInit();
27 |
28 | void psxBiosShutdown();
29 |
30 | void psxBiosException();
31 |
32 | extern void (*biosA0[256])();
33 |
34 | extern void (*biosB0[256])();
35 |
36 | extern void (*biosC0[256])();
37 |
38 | #endif /* __PSXBIOS_H__ */
39 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/PsxDma.h:
--------------------------------------------------------------------------------
1 | /* Pcsx - Pc Psx Emulator
2 | * Copyright (C) 1999-2002 Pcsx Team
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 | */
18 |
19 | #ifndef __PSXDMA_H__
20 | #define __PSXDMA_H__
21 |
22 | void psxDma2(u32 madr, u32 bcr, u32 chcr);
23 |
24 | void psxDma3(u32 madr, u32 bcr, u32 chcr);
25 |
26 | void psxDma4(u32 madr, u32 bcr, u32 chcr);
27 |
28 | void psxDma6(u32 madr, u32 bcr, u32 chcr);
29 |
30 | #endif /* __PSXDMA_H__ */
31 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/PsxHLE.h:
--------------------------------------------------------------------------------
1 | /* Pcsx - Pc Psx Emulator
2 | * Copyright (C) 1999-2002 Pcsx Team
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 | */
18 |
19 | #ifndef __PSXHLE_H__
20 | #define __PSXHLE_H__
21 |
22 | extern void (*psxHLEt[256])();
23 |
24 | #endif /* __PSXHLE_H__ */
25 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/PsxHw.h:
--------------------------------------------------------------------------------
1 | /* Pcsx - Pc Psx Emulator
2 | * Copyright (C) 1999-2002 Pcsx Team
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 | */
18 |
19 | #ifndef __PSXHW_H__
20 | #define __PSXHW_H__
21 |
22 | void psxHwReset();
23 |
24 | u8 psxHwRead8(u32 add);
25 |
26 | u16 psxHwRead16(u32 add);
27 |
28 | u32 psxHwRead32(u32 add);
29 |
30 | void psxHwWrite8(u32 add, u8 value);
31 |
32 | void psxHwWrite16(u32 add, u16 value);
33 |
34 | void psxHwWrite32(u32 add, u32 value);
35 |
36 | #endif /* __PSXHW_H__ */
37 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/Spu.c:
--------------------------------------------------------------------------------
1 | /* Pcsx - Pc Psx Emulator
2 | * Copyright (C) 1999-2002 Pcsx Team
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 | */
18 |
19 | #include "PsxCommon.h"
20 |
21 | void SPUirq(void) {
22 | psxHu32(0x1070) |= BFLIP32(0x200);
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/driver.h:
--------------------------------------------------------------------------------
1 | #ifdef __cplusplus
2 | extern "C" {
3 | #endif
4 |
5 | #include "types.h"
6 |
7 | typedef struct __PSFTAG {
8 | char *key;
9 | char *value;
10 | struct __PSFTAG *next;
11 | } PSFTAG;
12 |
13 | typedef struct {
14 | u32 length;
15 | u32 stop;
16 | u32 fade;
17 | char *title, *artist, *game, *year, *genre, *psfby, *comment, *copyright;
18 | PSFTAG *tags;
19 | } PSFINFO;
20 |
21 | int sexy_seek(u32 t);
22 | void sexy_stop(void);
23 | void sexy_execute(void);
24 | void sexy_shutdown();
25 |
26 | PSFINFO *sexy_load(char *path);
27 | PSFINFO *sexy_getpsfinfo(char *path);
28 | void sexy_freepsfinfo(PSFINFO *info);
29 |
30 | void sexyd_update(unsigned char *, long);
31 | #ifdef __cplusplus
32 | }
33 | #endif
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/spu/spu.h:
--------------------------------------------------------------------------------
1 | #ifdef __cplusplus
2 | extern "C" {
3 | #endif
4 |
5 | #include "../Misc.h"
6 | #include "../types.h"
7 |
8 | int SPUinit(void);
9 |
10 | int SPUopen(void);
11 |
12 | void SPUsetlength(s32 stop, s32 fade);
13 |
14 | int SPUclose(void);
15 |
16 | void SPUendflush(uint64_t *);
17 |
18 | // External, called by SPU code.
19 | void SPUirq(void);
20 |
21 | int *get_muted_channel_array();
22 |
23 | uint8_t *get_sound_buffer_ptr();
24 |
25 | uint64_t get_sound_buffer_size();
26 |
27 | void reset_sound_buffer_size();
28 |
29 | int is_cpu_open();
30 |
31 | #ifdef __cplusplus
32 | }
33 | #endif
--------------------------------------------------------------------------------
/app/src/main/cpp/psf/types.h:
--------------------------------------------------------------------------------
1 | #ifndef _SPSF_TYPES_H__
2 | #define _SPSF_TYPES_H__
3 |
4 | #include
5 |
6 | #define INLINE inline
7 |
8 | typedef int8_t s8;
9 | typedef int16_t s16;
10 | typedef int32_t s32;
11 | typedef int64_t s64;
12 |
13 | typedef uint8_t u8;
14 | typedef uint16_t u16;
15 | typedef uint32_t u32;
16 | typedef uint64_t u64;
17 |
18 |
19 |
20 | /* For gcc only? */
21 | #define PACKSTRUCT __attribute__ ((packed))
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psflib/.gitignore:
--------------------------------------------------------------------------------
1 | *.user
2 | *.o
3 | Debug
4 | Release
5 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psflib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # List of source files required by libpsflib and any emulators
2 |
3 | set(libpsflib_SRCS)
4 |
5 | include_directories(${CMAKE_CURRENT_SOURCE_DIR})
6 |
7 | # Add library to be compiled.
8 | add_library(psflib SHARED ${libpsflib_SRCS}
9 | psflib.c
10 | psf2fs.c)
11 |
12 | # Not sure what most of this means, but apparently it links to "android.h", "zlib.h" and "log.h"
13 | if (ANDROID)
14 | target_link_libraries(psflib
15 | log
16 | android
17 | z
18 | "-Wl,--no-warn-mismatch"
19 | "-Wl,--whole-archive"
20 | ${LIBS}
21 | "-Wl,--no-whole-archive"
22 | )
23 | endif ()
24 |
25 | # These headers are part of the generic psflib interface.
26 | set (EXPORTED_HEADERS psflib.h)
27 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psflib/LICENSE:
--------------------------------------------------------------------------------
1 | PSFLIB - The MIT License (MIT)
2 |
3 | Copyright (c) 2012-2015 Christopher Snowhill
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psflib/Makefile:
--------------------------------------------------------------------------------
1 | CFLAGS = -c -fPIC
2 |
3 | OBJS = psflib.o psf2fs.o
4 |
5 |
6 | OPTS = -O2
7 |
8 | all: libpsflib.a
9 |
10 | libpsflib.a : $(OBJS)
11 | $(AR) rcs $@ $^
12 |
13 | .c.o:
14 | $(CC) $(CFLAGS) $(OPTS) $*.c
15 |
16 | clean:
17 | rm -f $(OBJS) libpsflib.a > /dev/null
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psflib/psflib.pro:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------
2 | #
3 | # Project created by QtCreator 2012-12-26T16:54:29
4 | #
5 | #-------------------------------------------------
6 |
7 | QT -= core gui
8 |
9 | TARGET = psflib
10 | TEMPLATE = lib
11 | CONFIG += staticlib
12 |
13 | SOURCES += \
14 | psflib.c \
15 | psf2fs.c
16 |
17 | HEADERS += psflib.h \
18 | psf2fs.h
19 | unix:!symbian {
20 | maemo5 {
21 | target.path = /opt/usr/lib
22 | } else {
23 | target.path = /usr/lib
24 | }
25 | INSTALLS += target
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/cpp/psflib/psflib.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 | Source Files
19 |
20 |
21 |
22 |
23 | Header Files
24 |
25 |
26 | Header Files
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/img_album_art_blank-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigmabeta/chipbox/9326b88083050a903f8c8c27439bc7bdc8d2ad11/app/src/main/img_album_art_blank-web.png
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/BackendView.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend
2 |
3 | interface BackendView {
4 | fun play()
5 |
6 | fun pause()
7 |
8 | fun stop()
9 |
10 | fun skipToNext()
11 |
12 | fun skipToPrev()
13 |
14 | fun onGameLoadError()
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/NoisyReceiver.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import net.sigmabeta.chipbox.backend.player.Player
7 | import timber.log.Timber
8 |
9 | class NoisyReceiver constructor(val player: Player): BroadcastReceiver() {
10 | override fun onReceive(context: Context?, intent: Intent?) {
11 | Timber.w("Received BECOMING_NOISY intent.")
12 | player.pause()
13 | }
14 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/PrefManager.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend
2 |
3 | import android.content.SharedPreferences
4 | import net.sigmabeta.chipbox.BuildConfig
5 | import javax.inject.Inject
6 |
7 | class PrefManager @Inject constructor(val preferences: SharedPreferences) {
8 | fun get(key: String): Boolean = preferences.getBoolean(key, false)
9 |
10 | fun set(key: String, value: Boolean) {
11 | val editor = preferences.edit()
12 | editor.putBoolean(key, value)
13 | editor.apply()
14 | }
15 |
16 | companion object {
17 | private val TAG_PREF_KEY = BuildConfig.APPLICATION_ID + ".pref."
18 | val KEY_ONBOARDED = TAG_PREF_KEY + ".onboarded.new"
19 | }
20 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/Scanner.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend
2 |
3 | interface Scanner {
4 | fun getBackendId(): Int
5 |
6 | fun fileInfoSetup(path: String): String?
7 |
8 | fun fileInfoGetTrackCount(): Int
9 |
10 | fun fileInfoSetTrackNumber(trackNumber: Int)
11 |
12 | fun fileInfoTeardown()
13 |
14 | fun getFileTrackLength(): Long
15 |
16 | fun getFileIntroLength(): Long
17 |
18 | fun getFileLoopLength(): Long
19 |
20 | fun getFileTitle(): ByteArray?
21 |
22 | fun getFileGameTitle(): ByteArray?
23 |
24 | fun getFilePlatform(): ByteArray?
25 |
26 | fun getFileArtist(): ByteArray?
27 |
28 | companion object {
29 | val GME = net.sigmabeta.chipbox.backend.gme.ScannerImpl()
30 | val VGM = net.sigmabeta.chipbox.backend.vgm.ScannerImpl()
31 | val PSF = net.sigmabeta.chipbox.backend.psf.ScannerImpl()
32 |
33 | val EXTENSIONS_MUSIC = hashMapOf(
34 | Pair("spc", GME),
35 | Pair("vgm", VGM),
36 | Pair("vgz", VGM),
37 | Pair("nsf", GME),
38 | Pair("nsfe", GME),
39 | Pair("gbs", GME),
40 | Pair("psf", PSF),
41 | Pair("minipsf", PSF)
42 | )
43 | }
44 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/SessionCallback.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend
2 |
3 | import android.support.v4.media.session.MediaSessionCompat
4 | import timber.log.Timber
5 |
6 | class SessionCallback(val playerService: PlayerService) : MediaSessionCompat.Callback() {
7 | override fun onPlay() {
8 | Timber.v("Received PLAY command.")
9 |
10 | playerService.player?.start(null)
11 | }
12 |
13 | override fun onStop() {
14 | Timber.v("Received STOP command.")
15 |
16 | playerService.player?.stop()
17 | }
18 |
19 | override fun onPause() {
20 | Timber.v("Received PAUSE command.")
21 |
22 | playerService.player?.pause()
23 | }
24 |
25 | override fun onSkipToNext() {
26 | Timber.v("Received NEXT command.")
27 |
28 | playerService.player?.skipToNext()
29 | }
30 |
31 | override fun onSkipToPrevious() {
32 | Timber.v("Received PREV command.")
33 |
34 | playerService.player?.skipToPrev()
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/UiUpdater.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend
2 |
3 |
4 | import io.reactivex.Flowable
5 | import io.reactivex.processors.PublishProcessor
6 | import net.sigmabeta.chipbox.model.events.PlaybackEvent
7 | import javax.inject.Inject
8 | import javax.inject.Singleton
9 |
10 | @Singleton
11 | class UiUpdater @Inject constructor() {
12 | private val subject = PublishProcessor.create().toSerialized()
13 |
14 | fun send(event: PlaybackEvent) {
15 | subject.onNext(event)
16 | }
17 |
18 | fun asFlowable(): Flowable {
19 | return subject.onBackpressureDrop()
20 | }
21 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/gme/BackendImpl.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend.gme
2 |
3 | import net.sigmabeta.chipbox.backend.Backend
4 |
5 | class BackendImpl : Backend {
6 | init {
7 | if (!INITIALIZED) {
8 | System.loadLibrary(NAME)
9 | INITIALIZED = true
10 | }
11 | }
12 |
13 | external override fun loadFile(filename: String, track: Int, sampleRate: Int, bufferSize: Long, fadeTimeMs: Long)
14 |
15 | external override fun readNextSamples(targetBuffer: ShortArray)
16 |
17 | external override fun getMillisPlayed(): Long
18 |
19 | external override fun seek(timeInMsec: Long): String
20 |
21 | external override fun setTempo(tempo: Double)
22 |
23 | external override fun getVoiceCount(): Int
24 |
25 | external override fun getVoiceName(position: Int): String
26 |
27 | external override fun muteVoice(voiceNumber: Int, enabled: Int)
28 |
29 | external override fun isTrackOver(): Boolean
30 |
31 | external override fun teardown()
32 |
33 | external override fun getLastError(): String?
34 |
35 | companion object {
36 | const val NAME = "gme"
37 | const val ID = 0
38 |
39 | var INITIALIZED = false
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/gme/ScannerImpl.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend.gme
2 |
3 | import net.sigmabeta.chipbox.backend.Scanner
4 |
5 | class ScannerImpl : Scanner {
6 | init {
7 | if (!BackendImpl.INITIALIZED) {
8 | System.loadLibrary(BackendImpl.NAME)
9 | BackendImpl.INITIALIZED = true
10 | }
11 | }
12 |
13 | override fun getBackendId() = BackendImpl.ID
14 |
15 | external override fun fileInfoSetup(path: String): String?
16 |
17 | external override fun fileInfoGetTrackCount(): Int
18 |
19 | external override fun fileInfoSetTrackNumber(trackNumber: Int)
20 |
21 | external override fun fileInfoTeardown()
22 |
23 | external override fun getFileTrackLength(): Long
24 |
25 | external override fun getFileIntroLength(): Long
26 |
27 | external override fun getFileLoopLength(): Long
28 |
29 | external override fun getFileTitle(): ByteArray?
30 |
31 | external override fun getFileGameTitle(): ByteArray?
32 |
33 | external override fun getFilePlatform(): ByteArray?
34 |
35 | external override fun getFileArtist(): ByteArray?
36 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/module/AudioModule.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend.module
2 |
3 | import android.media.AudioFormat
4 | import android.media.AudioManager
5 | import android.media.AudioTrack
6 | import dagger.Module
7 | import dagger.Provides
8 | import net.sigmabeta.chipbox.model.audio.AudioConfig
9 | import timber.log.Timber
10 | import javax.inject.Singleton
11 |
12 | @Module
13 | class AudioModule {
14 | @Provides @Singleton fun provideAudioConfig(): AudioConfig {
15 | Timber.v("Providing AudioConfig...")
16 | val sampleRate = AudioTrack.getNativeOutputSampleRate(AudioManager.STREAM_MUSIC)
17 | val minBufferSize = AudioTrack.getMinBufferSize(sampleRate,
18 | AudioFormat.CHANNEL_OUT_STEREO,
19 | AudioFormat.ENCODING_PCM_16BIT)
20 |
21 | return AudioConfig(sampleRate, minBufferSize, 1, 3)
22 | }
23 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/player/Settings.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend.player
2 |
3 | import net.sigmabeta.chipbox.model.audio.Voice
4 | import timber.log.Timber
5 | import javax.inject.Inject
6 | import javax.inject.Singleton
7 |
8 | @Singleton
9 | class Settings @Inject constructor() {
10 | var tempo: Int? = 100
11 | set (value: Int?) {
12 | if (value != null) {
13 | field = value
14 | Timber.i("Setting tempo to %s", value)
15 | } else {
16 | field = 100
17 | }
18 | }
19 |
20 | var voices: MutableList? = null
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/psf/BackendImpl.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend.psf
2 |
3 | import net.sigmabeta.chipbox.backend.Backend
4 |
5 | class BackendImpl : Backend {
6 | init {
7 | if (!INITIALIZED) {
8 | System.loadLibrary(NAME)
9 | INITIALIZED = true
10 | }
11 | }
12 | external override fun loadFile(filename: String, track: Int, sampleRate: Int, bufferSize: Long, fadeTimeMs: Long)
13 |
14 | external override fun readNextSamples(targetBuffer: ShortArray)
15 |
16 | external override fun getMillisPlayed(): Long
17 |
18 | external override fun seek(timeInMsec: Long): String
19 |
20 | external override fun setTempo(tempo: Double)
21 |
22 | external override fun getVoiceCount(): Int
23 |
24 | external override fun getVoiceName(position: Int): String
25 |
26 | external override fun muteVoice(voiceNumber: Int, enabled: Int)
27 |
28 | external override fun isTrackOver(): Boolean
29 |
30 | external override fun teardown()
31 |
32 | external override fun getLastError(): String?
33 |
34 | companion object {
35 | const val NAME = "psf"
36 | const val ID = 2
37 |
38 | var INITIALIZED = false
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/vgm/BackendImpl.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend.vgm
2 |
3 | import net.sigmabeta.chipbox.backend.Backend
4 |
5 | class BackendImpl : Backend {
6 | init {
7 | if (!INITIALIZED) {
8 | System.loadLibrary(NAME)
9 | INITIALIZED = true
10 | }
11 | }
12 |
13 | external override fun loadFile(filename: String, track: Int, sampleRate: Int, bufferSize: Long, fadeTimeMs: Long)
14 |
15 | external override fun readNextSamples(targetBuffer: ShortArray)
16 |
17 | external override fun getMillisPlayed(): Long
18 |
19 | external override fun seek(timeInMsec: Long): String
20 |
21 | external override fun setTempo(tempo: Double)
22 |
23 | external override fun getVoiceCount(): Int
24 |
25 | external override fun getVoiceName(position: Int): String
26 |
27 | external override fun muteVoice(voiceNumber: Int, enabled: Int)
28 |
29 | external override fun isTrackOver(): Boolean
30 |
31 | external override fun teardown()
32 |
33 | external override fun getLastError(): String?
34 |
35 | companion object {
36 | const val NAME = "vgm"
37 | const val ID = 1
38 |
39 | var INITIALIZED = false
40 | }
41 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/backend/vgm/ScannerImpl.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.backend.vgm
2 |
3 | import net.sigmabeta.chipbox.backend.Scanner
4 |
5 | class ScannerImpl : Scanner {
6 | init {
7 | if (!BackendImpl.INITIALIZED) {
8 | System.loadLibrary(BackendImpl.NAME)
9 | BackendImpl.INITIALIZED = true
10 | }
11 | }
12 |
13 | override fun getBackendId() = BackendImpl.ID
14 |
15 | external override fun fileInfoSetup(path: String): String?
16 |
17 | external override fun fileInfoGetTrackCount(): Int
18 |
19 | external override fun fileInfoSetTrackNumber(trackNumber: Int)
20 |
21 | external override fun fileInfoTeardown()
22 |
23 | external override fun getFileTrackLength(): Long
24 |
25 | external override fun getFileIntroLength(): Long
26 |
27 | external override fun getFileLoopLength(): Long
28 |
29 | external override fun getFileTitle(): ByteArray?
30 |
31 | external override fun getFileGameTitle(): ByteArray?
32 |
33 | external override fun getFilePlatform(): ByteArray?
34 |
35 | external override fun getFileArtist(): ByteArray?
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/dagger/Initializer.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.dagger
2 |
3 | import android.app.Application
4 | import net.sigmabeta.chipbox.dagger.component.AppComponent
5 | import net.sigmabeta.chipbox.dagger.component.DaggerAppComponent
6 | import net.sigmabeta.chipbox.dagger.module.AppModule
7 | import timber.log.Timber
8 |
9 | object Initializer {
10 | fun initAppComponent(application: Application): AppComponent {
11 | Timber.v("Initializing Dagger AppComponent.")
12 |
13 | return DaggerAppComponent.builder()
14 | .appModule(AppModule(application))
15 | .build()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/dagger/component/FragmentComponent.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.dagger.component
2 |
3 | import dagger.Subcomponent
4 | import net.sigmabeta.chipbox.dagger.scope.ActivityScoped
5 | import net.sigmabeta.chipbox.ui.artist.ArtistListFragment
6 | import net.sigmabeta.chipbox.ui.games.GameGridFragment
7 | import net.sigmabeta.chipbox.ui.onboarding.library.LibraryFragment
8 | import net.sigmabeta.chipbox.ui.onboarding.title.TitleFragment
9 | import net.sigmabeta.chipbox.ui.platform.PlatformListFragment
10 | import net.sigmabeta.chipbox.ui.playlist.PlaylistFragment
11 | import net.sigmabeta.chipbox.ui.track.TrackListFragment
12 |
13 | @ActivityScoped
14 | @Subcomponent
15 | interface FragmentComponent {
16 | /**
17 | * Crucial: injection targets must be the correct type.
18 | * Passing an interface here will result in a no-op injection.
19 | */
20 | fun inject(view: TitleFragment)
21 | fun inject(view: LibraryFragment)
22 | fun inject(view: TrackListFragment)
23 | fun inject(view: PlatformListFragment)
24 | fun inject(view: GameGridFragment)
25 | fun inject(view: ArtistListFragment)
26 | fun inject(view: PlaylistFragment)
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/dagger/module/PreferenceModule.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.dagger.module
2 |
3 | import android.content.Context
4 | import android.content.SharedPreferences
5 | import android.preference.PreferenceManager
6 | import dagger.Module
7 | import dagger.Provides
8 | import timber.log.Timber
9 | import javax.inject.Singleton
10 |
11 | @Module
12 | class PreferenceModule() {
13 | @Provides @Singleton fun provideSharedPreferences(context: Context): SharedPreferences {
14 | Timber.v("Providing Shared Preferences...")
15 | return PreferenceManager.getDefaultSharedPreferences(context)
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/dagger/scope/ActivityScoped.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.dagger.scope
2 |
3 | import javax.inject.Scope
4 |
5 | @Scope
6 | annotation public class ActivityScoped
7 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/dagger/scope/BackendScoped.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.dagger.scope
2 |
3 | import javax.inject.Scope
4 |
5 | @Scope
6 | annotation public class BackendScoped
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/IdRealmObject.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model
2 |
3 | interface IdRealmObject {
4 | fun getPrimaryKey(): String?
5 | fun setPrimaryKey(id: String)
6 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/audio/AudioBuffer.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.audio
2 |
3 | class AudioBuffer(val bufferSizeBytes: Int) {
4 | val buffer = ShortArray(bufferSizeBytes)
5 | var timeStamp = -1L
6 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/audio/AudioConfig.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.audio
2 |
3 | class AudioConfig(val sampleRate: Int,
4 | val minBufferSizeBytes: Int,
5 | var bufferSizeMultiplier: Int,
6 | var bufferCount: Int) {
7 | val NUMBER_OF_CHANNELS = 2
8 |
9 | val BYTES_PER_SHORT = 2
10 |
11 | val singleBufferSizeBytes
12 | get() = minBufferSizeBytes * bufferSizeMultiplier
13 |
14 | val totalBufferSizeBytes
15 | get() = singleBufferSizeBytes * bufferCount
16 |
17 | val minBufferSizeShorts
18 | get() = minBufferSizeBytes / BYTES_PER_SHORT
19 |
20 | val singleBufferSizeShorts
21 | get() = singleBufferSizeBytes / BYTES_PER_SHORT
22 |
23 | val totalBufferSizeShorts
24 | get() = totalBufferSizeBytes / BYTES_PER_SHORT
25 |
26 | val minBufferSizeSamples
27 | get() = minBufferSizeShorts / NUMBER_OF_CHANNELS
28 |
29 | val singleBufferSizeSamples
30 | get() = singleBufferSizeShorts / NUMBER_OF_CHANNELS
31 |
32 | val totalBufferSizeSamples
33 | get() = totalBufferSizeShorts / NUMBER_OF_CHANNELS
34 |
35 | val minimumLatency
36 | get() = 1000 * minBufferSizeSamples / sampleRate
37 |
38 | val singleBufferLatency
39 | get() = 1000 * singleBufferSizeSamples / sampleRate
40 |
41 | val totalBufferSizeMs
42 | get() = 1000 * totalBufferSizeSamples / sampleRate
43 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/audio/Voice.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.audio
2 |
3 | import net.sigmabeta.chipbox.model.domain.ListItem
4 |
5 | class Voice(val position: Int, val name: String) : ListItem {
6 | var enabled: Boolean = true
7 |
8 | override fun isTheSameAs(theOther: ListItem?): Boolean {
9 | if (theOther is Voice) {
10 | if (theOther.name == this.name) {
11 | return true
12 | }
13 | }
14 |
15 | return false
16 | }
17 |
18 | override fun hasSameContentAs(theOther: ListItem?): Boolean {
19 | if (theOther is Voice) {
20 | if (theOther.enabled == this.enabled) {
21 | return true
22 | }
23 | }
24 |
25 | return false
26 | }
27 |
28 | override fun getChangeType(theOther: ListItem?): Int {
29 | if (theOther is Voice) {
30 | if (theOther.enabled != this.enabled) {
31 | return CHANGE_VOICE
32 | }
33 | }
34 |
35 | return ListItem.CHANGE_ERROR
36 | }
37 |
38 | companion object {
39 | val CHANGE_VOICE = 1
40 | }
41 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/database/module/RepositoryModule.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.database.module
2 |
3 | import android.content.Context
4 | import dagger.Lazy
5 | import dagger.Module
6 | import dagger.Provides
7 | import io.realm.Realm
8 | import net.sigmabeta.chipbox.dagger.module.AppModule
9 | import net.sigmabeta.chipbox.model.database.getRealmInstance
10 | import net.sigmabeta.chipbox.model.repository.LibraryScanner
11 | import net.sigmabeta.chipbox.model.repository.RealmRepository
12 | import net.sigmabeta.chipbox.model.repository.Repository
13 | import timber.log.Timber
14 | import javax.inject.Named
15 | import javax.inject.Singleton
16 |
17 | @Module
18 | class RepositoryModule() {
19 | @Provides fun provideRealm(): Realm {
20 | return getRealmInstance()
21 | }
22 |
23 | @Provides fun provideRepository(context: Context, realm: Realm): Repository {
24 | Timber.v("Providing Repository...")
25 | return RealmRepository(realm)
26 | }
27 |
28 | @Provides @Singleton fun provideScanner(repositoryLazy: Lazy,
29 | context: Context,
30 | @Named(AppModule.DEP_NAME_APP_STORAGE_DIR) externalFilesPath: String?): LibraryScanner {
31 | Timber.v("Providing Library Scanner...")
32 | return LibraryScanner(repositoryLazy, context, externalFilesPath)
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/domain/ListItem.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.domain
2 |
3 | interface ListItem {
4 | fun isTheSameAs(theOther: ListItem?): Boolean
5 |
6 | fun hasSameContentAs(theOther: ListItem?): Boolean
7 |
8 | fun getChangeType(theOther: ListItem?): Int
9 |
10 | companion object {
11 | val CHANGE_ERROR = -1
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/domain/Platform.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.domain
2 |
3 | import io.realm.RealmObject
4 | import io.realm.annotations.PrimaryKey
5 | import net.sigmabeta.chipbox.model.IdRealmObject
6 | import net.sigmabeta.chipbox.model.domain.ListItem.Companion.CHANGE_ERROR
7 |
8 | open class Platform() : RealmObject(), IdRealmObject, ListItem {
9 | constructor(name: String) : this() {
10 | this.name = name;
11 | }
12 |
13 | @PrimaryKey open var id: String? = null
14 |
15 | open var name: String? = null
16 |
17 | override fun getPrimaryKey() = id
18 | override fun setPrimaryKey(id: String) {
19 | this.id = id
20 | }
21 |
22 | override fun isTheSameAs(theOther: ListItem?): Boolean {
23 | if (theOther is Platform) {
24 | if (theOther.id == this.id) {
25 | return true
26 | }
27 | }
28 |
29 | return false
30 | }
31 |
32 | override fun hasSameContentAs(theOther: ListItem?): Boolean {
33 | if (theOther is Platform) {
34 | if (theOther.id == this.id) {
35 | return true
36 | }
37 | }
38 |
39 | return false
40 | }
41 |
42 | override fun getChangeType(theOther: ListItem?): Int {
43 | return CHANGE_ERROR
44 | }
45 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/events/FileScanCompleteEvent.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.events
2 |
3 | class FileScanCompleteEvent(val newTracks: Int,
4 | val updatedTracks: Int) : PlaybackEvent() {
5 | override fun getType(): String {
6 | return EVENT_TYPE
7 | }
8 |
9 | override fun getDataAsString(): String? {
10 | return "Found $newTracks new tracks & updated $updatedTracks."
11 | }
12 |
13 | companion object {
14 | val EVENT_TYPE = "filescan.complete"
15 | }
16 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/events/FileScanEvent.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.events
2 |
3 | class FileScanEvent(val type: Int,
4 | val name: String,
5 | val count: Int = 0) : PlaybackEvent() {
6 | override fun getType(): String {
7 | return EVENT_TYPE
8 | }
9 |
10 | override fun getDataAsString(): String? {
11 | return name
12 | }
13 |
14 | companion object {
15 | val EVENT_TYPE = "filescan"
16 |
17 | val TYPE_FOLDER = 0
18 | val TYPE_NEW_TRACK = 1
19 | val TYPE_BAD_TRACK = 2
20 | val TYPE_NEW_MULTI_TRACK = 3
21 | val TYPE_UPDATED_TRACK = 4
22 | val TYPE_DELETED_TRACK = 5
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/events/FileScanFailedEvent.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.events
2 |
3 | class FileScanFailedEvent(val exception: Throwable) : PlaybackEvent() {
4 | override fun getType(): String {
5 | return EVENT_TYPE
6 | }
7 |
8 | override fun getDataAsString(): String? {
9 | return exception.message
10 | }
11 |
12 | companion object {
13 | val EVENT_TYPE = "filescan.failed"
14 | }
15 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/events/GameEvent.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.events
2 |
3 | class GameEvent(val gameId: String?) : PlaybackEvent() {
4 | override fun getType(): String {
5 | return EVENT_TYPE
6 | }
7 |
8 | override fun getDataAsString(): String? {
9 | return gameId
10 | }
11 |
12 | companion object {
13 | val EVENT_TYPE = "game"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/events/PlaybackEvent.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.events
2 |
3 | abstract class PlaybackEvent {
4 | abstract fun getType(): String
5 |
6 | abstract fun getDataAsString(): String?
7 |
8 | override fun toString(): String {
9 | return "Event: ${getType()} Data: ${getDataAsString()}"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/events/PositionEvent.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.events
2 |
3 | class PositionEvent(val millisPlayed: Long) : PlaybackEvent() {
4 | override fun getType(): String {
5 | return EVENT_TYPE
6 | }
7 |
8 | override fun getDataAsString(): String {
9 | return millisPlayed.toString()
10 | }
11 |
12 | companion object {
13 | val EVENT_TYPE = "position"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/events/StateEvent.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.events
2 |
3 | class StateEvent(val state: Int) : PlaybackEvent() {
4 | override fun getType(): String {
5 | return EVENT_TYPE
6 | }
7 |
8 | override fun getDataAsString(): String {
9 | return state.toString()
10 | }
11 |
12 | companion object {
13 | val EVENT_TYPE = "state"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/events/TrackEvent.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.events
2 |
3 | class TrackEvent(val trackId: String?) : PlaybackEvent() {
4 | override fun getType(): String {
5 | return EVENT_TYPE
6 | }
7 |
8 | override fun getDataAsString(): String? {
9 | return trackId
10 | }
11 |
12 | companion object {
13 | val EVENT_TYPE = "track"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/model/file/Folder.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.model.file
2 |
3 |
4 | class Folder(var path: String)
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/BaseView.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui
2 |
3 | import android.view.View
4 | import net.sigmabeta.chipbox.ChipboxApplication
5 |
6 | interface BaseView {
7 | fun onClick(clicked: View)
8 |
9 | fun getTypedApplication(): ChipboxApplication
10 |
11 | fun requestReSetup()
12 |
13 | fun showErrorState()
14 |
15 | fun showEmptyState()
16 |
17 | fun showLoadingState()
18 |
19 | fun showContent()
20 |
21 | /**
22 | * Error Handling
23 | */
24 |
25 | fun showError(message: String, action: View.OnClickListener? = null, actionLabel: Int = 0)
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/BaseViewHolder.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui
2 |
3 | import android.view.View
4 | import androidx.recyclerview.widget.RecyclerView
5 | import kotlinx.android.extensions.LayoutContainer
6 | import net.sigmabeta.chipbox.model.domain.ListItem
7 |
8 | abstract class BaseViewHolder, A : BaseArrayAdapter>(
9 | override val containerView: View,
10 | val adapter: A) : RecyclerView.ViewHolder(containerView), View.OnClickListener, LayoutContainer {
11 | init {
12 | containerView.setOnClickListener(this)
13 | }
14 |
15 | override fun onClick(clicked: View) {
16 | adapter.onItemClick(adapterPosition)
17 | }
18 |
19 | abstract fun bind(toBind: T)
20 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/ChromeView.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui
2 |
3 | interface ChromeView : BaseView {
4 | fun setTrackTitle(title: String, animate: Boolean)
5 |
6 | fun setArtist(artist: String, animate: Boolean)
7 |
8 | fun setGameBoxArt(imagePath: String?, fade: Boolean)
9 |
10 | fun showPauseButton()
11 |
12 | fun showPlayButton()
13 |
14 | fun showNowPlaying()
15 |
16 | fun hideNowPlaying()
17 |
18 | fun launchPlayerActivity()
19 |
20 | fun launchSettingsActivity()
21 |
22 | fun launchDebugActivity()
23 |
24 | fun launchOnboarding()
25 |
26 | fun setScanText(type: Int?, name: String?)
27 |
28 | fun showScanning()
29 |
30 | fun hideScanning()
31 |
32 | fun showFileScanSuccess(newTracks: Int, updatedTracks: Int)
33 |
34 | fun startScanner()
35 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/DiffCallback.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui
2 |
3 | import androidx.recyclerview.widget.DiffUtil
4 | import net.sigmabeta.chipbox.model.domain.ListItem
5 |
6 | class DiffCallback(val oldList: List?,
7 | val newList: List?) : DiffUtil.Callback() {
8 | override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
9 | val oldItem = getOldItem(oldItemPosition)
10 | val newItem = getNewItem(newItemPosition)
11 |
12 | return oldItem?.isTheSameAs(newItem) ?: false
13 | }
14 |
15 | override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
16 | val oldItem = getOldItem(oldItemPosition)
17 | val newItem = getNewItem(newItemPosition)
18 |
19 | return oldItem?.hasSameContentAs(newItem) ?: false
20 | }
21 |
22 | override fun getOldListSize() = oldList?.size ?: 0
23 |
24 | override fun getNewListSize() = newList?.size ?: 0
25 |
26 | /**
27 | * Private Methods
28 | */
29 |
30 | private fun getOldItem(position: Int) = oldList?.get(position)
31 |
32 | private fun getNewItem(position: Int) = newList?.get(position)
33 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/FragmentContainer.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui
2 |
3 | interface FragmentContainer {
4 | fun setTitle(title: String)
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/InvalidClearViewException.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui
2 |
3 | class InvalidClearViewException(view: BaseView?) : RuntimeException() {
4 |
5 | val errorMessage: String
6 |
7 | init {
8 | this.errorMessage = "Cannot clear reference to ${view?.javaClass?.simpleName}" +
9 | ": Presenter already has another reference."
10 | }
11 |
12 | override val message: String?
13 | get() = errorMessage
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/ListView.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui
2 |
3 | import io.realm.OrderedCollectionChangeSet
4 | import net.sigmabeta.chipbox.model.domain.ListItem
5 |
6 |
7 | interface ListView> : BaseView {
8 | fun setList(list: List)
9 |
10 | fun animateChanges(changeset: OrderedCollectionChangeSet)
11 |
12 | fun onItemClick(position: Int)
13 |
14 | fun startDrag(holder: VH) = Unit
15 |
16 | fun isScrolledToBottom(): Boolean
17 |
18 | fun startRescan()
19 |
20 | fun refreshList()
21 |
22 | fun showScanningWaitMessage()
23 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/NavigationFragment.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui
2 |
3 | import android.view.View
4 |
5 | interface NavigationFragment {
6 | fun isScrolledToBottom(): Boolean
7 |
8 | fun getScrollingView(): View
9 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/UiState.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui
2 |
3 | enum class UiState {
4 | NONE,
5 | ERROR,
6 | CANCELED,
7 | EMPTY,
8 | LOADING,
9 | READY
10 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/artist/ArtistListAdapter.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui.artist
2 |
3 | import android.view.View
4 | import net.sigmabeta.chipbox.R
5 | import net.sigmabeta.chipbox.model.domain.Artist
6 | import net.sigmabeta.chipbox.ui.BaseArrayAdapter
7 | import net.sigmabeta.chipbox.ui.ListView
8 |
9 | class ArtistListAdapter(view: ListView) : BaseArrayAdapter(view) {
10 | override fun getLayoutId(): Int {
11 | return R.layout.list_item_artist
12 | }
13 |
14 | override fun createViewHolder(view: View): ArtistViewHolder {
15 | return ArtistViewHolder(view, this)
16 | }
17 |
18 | override fun bind(holder: ArtistViewHolder, item: Artist) {
19 | holder.bind(item)
20 | }
21 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/artist/ArtistListPresenter.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui.artist
2 |
3 | import net.sigmabeta.chipbox.backend.UiUpdater
4 | import net.sigmabeta.chipbox.dagger.scope.ActivityScoped
5 | import net.sigmabeta.chipbox.model.domain.Artist
6 | import net.sigmabeta.chipbox.model.repository.LibraryScanner
7 | import net.sigmabeta.chipbox.ui.ListPresenter
8 | import javax.inject.Inject
9 |
10 | @ActivityScoped
11 | class ArtistListPresenter @Inject constructor(val updater: UiUpdater,
12 | val scanner: LibraryScanner) : ListPresenter() {
13 |
14 | /**
15 | * ListPresenter
16 | */
17 |
18 | override fun onItemClick(position: Int) {
19 | if (scanner.state != LibraryScanner.STATE_SCANNING) {
20 | val id = list?.get(position)?.id ?: return
21 | view?.launchNavActivity(id)
22 | } else {
23 | view?.showScanningWaitMessage()
24 | }
25 | }
26 |
27 | override fun getLoadOperation() = repository.getArtists()
28 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/artist/ArtistListView.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui.artist
2 |
3 | import net.sigmabeta.chipbox.model.domain.Artist
4 | import net.sigmabeta.chipbox.ui.ListView
5 |
6 | interface ArtistListView : ListView {
7 | fun launchNavActivity(id: String)
8 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/artist/ArtistViewHolder.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui.artist
2 |
3 | import android.view.View
4 | import kotlinx.android.synthetic.main.list_item_artist.*
5 | import net.sigmabeta.chipbox.model.domain.Artist
6 | import net.sigmabeta.chipbox.ui.BaseViewHolder
7 |
8 | class ArtistViewHolder(view: View, adapter: ArtistListAdapter) : BaseViewHolder(view, adapter) {
9 | override fun bind(toBind: Artist) {
10 | text_artist_name.text = toBind.name
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/debug/DebugView.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui.debug
2 |
3 | import net.sigmabeta.chipbox.ui.BaseView
4 |
5 | interface DebugView : BaseView {
6 | fun showBufferSize(minBytes: Int, multiplier: Int)
7 |
8 | fun showBufferCount(buffers: Int)
9 |
10 | fun showMinimumLatency(millis: Int)
11 |
12 | fun showActualLatency(millis: Int)
13 |
14 | fun showTotalBufferSize(millis: Int)
15 |
16 | fun showSampleRate(hertz: Int)
17 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/game/GameHeaderViewHolder.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui.game
2 |
3 | import android.view.View
4 | import kotlinx.android.synthetic.main.list_header_game.*
5 | import net.sigmabeta.chipbox.model.repository.RealmRepository
6 | import timber.log.Timber
7 |
8 | class GameHeaderViewHolder(view: View, adapter: GameTrackListAdapter) : GameTrackViewHolder(view, adapter) {
9 |
10 | fun bind() {
11 | adapter.game?.let {
12 | text_title.text = it.title ?: RealmRepository.GAME_UNKNOWN
13 | text_subtitle.text = it.artist?.name ?: RealmRepository.ARTIST_UNKNOWN
14 | header_text_game_track_count.text = "${adapter.dataset?.size} tracks"
15 |
16 | header_text_game_platform.setText(it.platformName)
17 | }
18 | }
19 |
20 | init {
21 | Timber.i("Creating headerholder.")
22 | }
23 | }
--------------------------------------------------------------------------------
/app/src/main/java/net/sigmabeta/chipbox/ui/game/GameView.kt:
--------------------------------------------------------------------------------
1 | package net.sigmabeta.chipbox.ui.game
2 |
3 | import net.sigmabeta.chipbox.model.domain.Game
4 | import net.sigmabeta.chipbox.model.domain.Track
5 | import net.sigmabeta.chipbox.ui.ChromeView
6 |
7 | interface GameView : ChromeView {
8 | fun setTracks(tracks: List