3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005-2009 Christian Schoenebeck * |
* Copyright (C) 2005-2021 Christian Schoenebeck * |
7 |
* Copyright (C) 2009 Christian Schoenebeck and Grigor Iliev * |
* Copyright (C) 2009 Grigor Iliev * |
|
* Copyright (C) 2016 Christian Schoenebeck * |
|
8 |
* * |
* * |
9 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
10 |
* 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 * |
96 |
playbackState.reverse = false; |
playbackState.reverse = false; |
97 |
playbackState.loop_cycles_left = pRgn->pSample->LoopPlayCount; |
playbackState.loop_cycles_left = pRgn->pSample->LoopPlayCount; |
98 |
|
|
99 |
|
// assuming libgig's file-IO-per-thread feature is enabled: by default |
100 |
|
// the file stream is closed for this thread, so open it for being able |
101 |
|
// to read the .gig file (see libgig's RIFF::File::SetIOPerThread() for |
102 |
|
// details) |
103 |
|
::gig::File* gig = (::gig::File*) pRgn->pSample->GetParent(); |
104 |
|
::RIFF::File* riff = gig->GetRiffFile(); |
105 |
|
if (riff->GetMode() == ::RIFF::stream_mode_closed) { |
106 |
|
try { |
107 |
|
riff->SetMode(::RIFF::stream_mode_read); |
108 |
|
} catch (...) { |
109 |
|
dmsg(1,("Failed opening disk stream\n")); |
110 |
|
} |
111 |
|
} |
112 |
|
|
113 |
LinuxSampler::StreamBase< ::gig::DimensionRegion>::Launch ( |
LinuxSampler::StreamBase< ::gig::DimensionRegion>::Launch ( |
114 |
hStream, pExportReference, pRgn, info, playbackState, SampleOffset, DoLoop |
hStream, pExportReference, pRgn, info, playbackState, SampleOffset, DoLoop |
115 |
); |
); |