mirror of https://github.com/AxioDL/amuse.git
Merge branch 'master' of https://github.com/AxioDL/amuse
This commit is contained in:
commit
13a55764a0
|
@ -62,7 +62,7 @@ set(HEADERS
|
|||
unset(EXTRAS)
|
||||
if(TARGET boo)
|
||||
include_directories(${BOO_INCLUDE_DIR} ${BOO_INCLUDE_DIR}/../lib ${BOO_INCLUDE_DIR}/../soxr/src
|
||||
${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR})
|
||||
${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||
list(APPEND EXTRAS lib/BooBackend.cpp include/amuse/BooBackend.hpp)
|
||||
endif()
|
||||
|
||||
|
|
40
README.md
40
README.md
|
@ -7,6 +7,40 @@ The project is designed for compatibility with Audio Groups and Song data
|
|||
found in PC/N64/GCN/GBA games using the *MusyX* audio engine; providing an
|
||||
alternate runtime library to use for sequencing these games' audio libraries.
|
||||
|
||||
#### Command-Line Player
|
||||
|
||||
[Download](https://github.com/AxioDL/amuse/releases)
|
||||
|
||||
A simple command-line program for loading and playing AudioGroups out of
|
||||
game archives or raw (`.proj`,`.pool`,`.sdir`,`.samp`) files is provided.
|
||||
|
||||
```sh
|
||||
[jacko@ghor ~]$ amuseplay test.proj
|
||||
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
░░░ ████ ████ ┃ ████ ████ ████ ┃ ████ ████ ░░░
|
||||
░░░ ████ ████ ┃ ████ ████ ████ ┃ ████ ████ ░░░
|
||||
░░░ ▌W▐█ ▌E▐█ ┃ ▌T▐█ ▌Y▐█ ▌U▐█ ┃ ▌O▐█ ▌P▐█ ░░░
|
||||
░░░ │ │ ┃ │ │ │ ┃ │ │ ░░░
|
||||
░░░ A │ S │ D ┃ F │ G │ H │ J ┃ K │ L │ ; ░░░
|
||||
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
<left/right>: cycle MIDI setup / channel, <up/down>: volume, <space>: PANIC
|
||||
<tab>: sustain pedal, <window-Y>: pitch wheel, <window-X>: mod wheel
|
||||
<Z/X>: octave, <C/V>: velocity, <B/N>: channel, <,/.>: program, <Q>: quit
|
||||
0 Setup 0, Chan 0, Prog 0, Octave: 4, Vel: 64, VOL: 80%
|
||||
```
|
||||
|
||||
The command-line program requires a windowing environment and will open a
|
||||
small 100x100 window alongside your terminal/cmd. This window **must** be
|
||||
frontmost, since it listens to full keyboard events through it.
|
||||
|
||||
If a MIDI keyboard is connected and recognized by your OS before `amuseplay`
|
||||
is launched, you may directly control the sequencer using physical input.
|
||||
|
||||
On OS X and Linux, `amuseplay` will advertise a virtual MIDI-IN port for
|
||||
other audio applications to route their MIDI messages to. This enables
|
||||
tracker, drum machine, and DAW applications to produce sampled audio
|
||||
using Amuse directly.
|
||||
|
||||
#### Library
|
||||
|
||||
The Amuse API exposes full interactivity between a client application
|
||||
|
@ -78,9 +112,3 @@ int main(int argc, char* argv[])
|
|||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
#### Tool
|
||||
|
||||
In addition to the library, a command-line tool for performing various pipeline
|
||||
tasks is provided. Compilers for audio groups and song data, as well as basic
|
||||
playback functionality is available via the tool.
|
||||
|
|
|
@ -568,13 +568,20 @@ struct AppCallback : boo::IApplicationCallback
|
|||
if (m_argc < 2)
|
||||
Log.report(logvisor::Fatal, "needs group path argument");
|
||||
|
||||
amuse::ContainerRegistry::Type cType = amuse::ContainerRegistry::DetectContainerType(m_argv[1]);
|
||||
#if _WIN32
|
||||
char utf8Path[1024];
|
||||
WideCharToMultiByte(CP_UTF8, 0, m_argv[1], -1, utf8Path, 1024, nullptr, nullptr);
|
||||
#else
|
||||
const char* utf8Path = m_argv[1];
|
||||
#endif
|
||||
|
||||
amuse::ContainerRegistry::Type cType = amuse::ContainerRegistry::DetectContainerType(utf8Path);
|
||||
if (cType == amuse::ContainerRegistry::Type::Invalid)
|
||||
Log.report(logvisor::Fatal, "invalid/no data at path argument");
|
||||
Log.report(logvisor::Info, "Found '%s' Audio Group data", amuse::ContainerRegistry::TypeToName(cType));
|
||||
|
||||
std::vector<std::pair<std::string, amuse::IntrusiveAudioGroupData>> data =
|
||||
amuse::ContainerRegistry::LoadContainer(m_argv[1]);
|
||||
amuse::ContainerRegistry::LoadContainer(utf8Path);
|
||||
if (data.empty())
|
||||
Log.report(logvisor::Fatal, "invalid/no data at path argument");
|
||||
|
||||
|
|
|
@ -4,9 +4,12 @@
|
|||
#include <algorithm>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <strings.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
namespace amuse
|
||||
{
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ AudioGroupSampleDirectory::AudioGroupSampleDirectory(const unsigned char* data,
|
|||
const AudioGroupSampleDirectory::ADPCMParms* adpcm =
|
||||
reinterpret_cast<const AudioGroupSampleDirectory::ADPCMParms*>(data +
|
||||
store.first.m_adpcmParmOffset);
|
||||
store.second = *adpcm;
|
||||
store.second.dsp = adpcm->dsp;
|
||||
store.second.swapBigDSP();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue