/[svn]/linuxsampler/trunk/src/engines/gig/Stream.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/Stream.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3916 by schoenebeck, Thu Dec 15 12:47:45 2016 UTC revision 3917 by schoenebeck, Thu Jun 10 12:58:37 2021 UTC
# Line 3  Line 3 
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  *
# Line 97  namespace LinuxSampler { namespace gig { Line 96  namespace LinuxSampler { namespace gig {
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          );          );

Legend:
Removed from v.3916  
changed lines
  Added in v.3917

  ViewVC Help
Powered by ViewVC