add sample rate parameter in raw sample import
This commit is contained in:
parent
ab3624789b
commit
928bfd2afd
4 changed files with 16 additions and 6 deletions
|
|
@ -302,7 +302,7 @@ DivSample* DivEngine::sampleFromFile(const char* path) {
|
|||
#endif
|
||||
}
|
||||
|
||||
DivSample* DivEngine::sampleFromFileRaw(const char* path, DivSampleDepth depth, int channels, bool bigEndian, bool unsign, bool swapNibbles) {
|
||||
DivSample* DivEngine::sampleFromFileRaw(const char* path, DivSampleDepth depth, int channels, bool bigEndian, bool unsign, bool swapNibbles, int rate) {
|
||||
if (song.sample.size()>=256) {
|
||||
lastError="too many samples!";
|
||||
return NULL;
|
||||
|
|
@ -420,8 +420,8 @@ DivSample* DivEngine::sampleFromFileRaw(const char* path, DivSampleDepth depth,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
sample->rate=32000;
|
||||
sample->centerRate=32000;
|
||||
sample->rate=rate;
|
||||
sample->centerRate=rate;
|
||||
sample->depth=depth;
|
||||
sample->init(samples);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue