3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2008 Anders Dahnielson <anders@dahnielson.com> * |
* Copyright (C) 2008 Anders Dahnielson <anders@dahnielson.com> * |
6 |
* Copyright (C) 2009 - 2011 Anders Dahnielson and Grigor Iliev * |
* Copyright (C) 2009 - 2013 Anders Dahnielson and Grigor Iliev * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
56 |
long TotalFrames; |
long TotalFrames; |
57 |
|
|
58 |
public: |
public: |
59 |
Sample(String File, bool DontClose = false, uint offset = 0, int end = -2 /* -2 means unspecified */) |
Sample(String File, bool DontClose = false, uint offset = 0, int end = 0 /* 0 means unspecified */) |
60 |
: LinuxSampler::SampleFileBase<Region>(File, DontClose) |
: LinuxSampler::SampleFileBase<Region>(File, DontClose) |
61 |
{ |
{ |
62 |
Offset = offset; |
Offset = offset; |
68 |
Offset = 0; |
Offset = 0; |
69 |
} |
} |
70 |
|
|
71 |
if (End == -2 || End > tfc) TotalFrames = tfc; |
if (End == 0 || End > tfc) TotalFrames = tfc; |
72 |
else if (End == -1 || End < Offset) TotalFrames = 0; |
else if (End == -1 || End < Offset) TotalFrames = 0; |
73 |
else TotalFrames = End; |
else TotalFrames = End; |
74 |
} |
} |
506 |
optional<float> delay; optional<float> delay_random; Array<optional<float> > delay_oncc; |
optional<float> delay; optional<float> delay_random; Array<optional<float> > delay_oncc; |
507 |
optional<int> delay_beats; optional<int> stop_beats; |
optional<int> delay_beats; optional<int> stop_beats; |
508 |
optional<int> delay_samples; Array<optional<int> > delay_samples_oncc; |
optional<int> delay_samples; Array<optional<int> > delay_samples_oncc; |
509 |
optional<int> end; |
int end; |
510 |
optional<float> loop_crossfade; |
optional<float> loop_crossfade; |
511 |
optional<uint> offset; optional<int> offset_random; Array<optional<int> > offset_oncc; |
optional<uint> offset; optional<int> offset_random; Array<optional<int> > offset_oncc; |
512 |
loop_mode_t loop_mode; |
loop_mode_t loop_mode; |
516 |
|
|
517 |
// amplifier |
// amplifier |
518 |
float volume; |
float volume; |
519 |
|
float amplitude; |
520 |
float pan; |
float pan; |
521 |
float width; |
float width; |
522 |
float position; |
float position; |