mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-29 19:37:30 +01:00
moving some more stuff around
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@16 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
7d7ec31b0d
commit
7472c2e4f9
@ -1,4 +1,4 @@
|
||||
#include "adx.h"
|
||||
#include "adx_decoder.h"
|
||||
#include "../util.h"
|
||||
|
||||
void decode_adx(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
|
@ -4,10 +4,9 @@
|
||||
|
||||
#include "../vgmstream.h"
|
||||
|
||||
#ifndef _ADX_H
|
||||
#define _ADX_H
|
||||
#ifndef _ADX_DECODER_H
|
||||
#define _ADX_DECODER_H
|
||||
|
||||
VGMSTREAM * init_vgmstream_adx(const char * const filename);
|
||||
void decode_adx(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
#include "adx.h"
|
||||
#include "pcm_decoder.h"
|
||||
#include "../util.h"
|
||||
|
||||
void decode_pcm16LE(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
|
@ -1,13 +0,0 @@
|
||||
/*
|
||||
* adx.h - ADX reading and decoding
|
||||
*/
|
||||
|
||||
#include "../vgmstream.h"
|
||||
|
||||
#ifndef _ADX_H
|
||||
#define _ADX_H
|
||||
|
||||
VGMSTREAM * init_vgmstream_adx(const char * const filename);
|
||||
void decode_adx(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
|
||||
#endif
|
@ -1,7 +1,7 @@
|
||||
#include "interleave.h"
|
||||
#include "adx.h"
|
||||
#include "gcdsp_decoder.h"
|
||||
#include "pcm_decoder.h"
|
||||
#include "../coding/adx_decoder.h"
|
||||
#include "../coding/gcdsp_decoder.h"
|
||||
#include "../coding/pcm_decoder.h"
|
||||
|
||||
void render_vgmstream_interleave(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream) {
|
||||
int samples_written=0;
|
@ -1,6 +1,7 @@
|
||||
#include "nolayout.h"
|
||||
#include "adx.h"
|
||||
#include "gcdsp_decoder.h"
|
||||
#include "../coding/adx_decoder.h"
|
||||
#include "../coding/gcdsp_decoder.h"
|
||||
#include "../coding/pcm_decoder.h"
|
||||
|
||||
void render_vgmstream_nolayout(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream) {
|
||||
int samples_written=0;
|
||||
@ -15,6 +16,11 @@ void render_vgmstream_nolayout(sample * buffer, int32_t sample_count, VGMSTREAM
|
||||
case coding_NGC_DSP:
|
||||
samples_per_frame = 14;
|
||||
break;
|
||||
case coding_PCM16LE:
|
||||
case coding_PCM16BE:
|
||||
case coding_PCM8:
|
||||
samples_per_frame = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
while (samples_written<sample_count) {
|
||||
@ -63,7 +69,7 @@ void render_vgmstream_nolayout(sample * buffer, int32_t sample_count, VGMSTREAM
|
||||
|
||||
}
|
||||
|
||||
if ((vgmstream->samples_into_block%samples_per_frame)+samples_to_do>samples_per_frame) samples_to_do=samples_per_frame-(vgmstream->samples_into_block%samples_per_frame);
|
||||
if (samples_per_frame > 1 && (vgmstream->samples_into_block%samples_per_frame)+samples_to_do>samples_per_frame) samples_to_do=samples_per_frame-(vgmstream->samples_into_block%samples_per_frame);
|
||||
|
||||
if (samples_written+samples_to_do > sample_count)
|
||||
samples_to_do=sample_count-samples_written;
|
@ -1,5 +1,5 @@
|
||||
#include <math.h>
|
||||
#include "adx.h"
|
||||
#include "adx_header.h"
|
||||
#include "../util.h"
|
||||
|
||||
VGMSTREAM * init_vgmstream_adx(const char * const filename) {
|
12
src/meta/adx_header.h
Normal file
12
src/meta/adx_header.h
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
* adx.h - ADX reading and decoding
|
||||
*/
|
||||
|
||||
#include "../vgmstream.h"
|
||||
|
||||
#ifndef _ADX_HEADER_H
|
||||
#define _ADX_HEADER_H
|
||||
|
||||
VGMSTREAM * init_vgmstream_adx(const char * const filename);
|
||||
|
||||
#endif
|
@ -1,8 +1,8 @@
|
||||
#include "vgmstream.h"
|
||||
#include "fmt/adx.h"
|
||||
#include "fmt/brstm.h"
|
||||
#include "fmt/interleave.h"
|
||||
#include "fmt/nolayout.h"
|
||||
#include "meta/adx_header.h"
|
||||
#include "meta/brstm.h"
|
||||
#include "layout/interleave.h"
|
||||
#include "layout/nolayout.h"
|
||||
|
||||
/*
|
||||
* List of functions that will recognize files. These should correspond pretty
|
||||
|
@ -1,6 +1,6 @@
|
||||
CFLAGS=-lm -O3
|
||||
|
||||
test: test.c ../src/streamfile.c ../src/vgmstream.c ../src/util.c ../src/fmt/adx_header.c ../src/fmt/adx_decoder.c ../src/fmt/gcdsp_decoder.c ../src/fmt/brstm.c ../src/fmt/interleave.c ../src/fmt/nolayout.c ../src/fmt/pcm_decoder.c
|
||||
test: test.c ../src/streamfile.c ../src/vgmstream.c ../src/util.c ../src/meta/adx_header.c ../src/coding/adx_decoder.c ../src/coding/gcdsp_decoder.c ../src/meta/brstm.c ../src/layout/interleave.c ../src/layout/nolayout.c ../src/coding/pcm_decoder.c
|
||||
|
||||
clean:
|
||||
rm test
|
||||
|
Loading…
x
Reference in New Issue
Block a user