All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
ExternalFileProcessor Class Referenceabstract
Inheritance diagram for ExternalFileProcessor:
AudioSampleProcessor JavascriptMidiProcessor ModulatorSampler AudioFileEnvelope ConvolutionEffect

Public Member Functions

File getFile (const String &fileNameOrReference, PresetPlayerHandler::FolderType type=PresetPlayerHandler::GlobalSampleDirectory)
 
virtual void replaceReferencesWithGlobalFolder ()=0
 
String getGlobalReferenceForFile (const String &file, PresetPlayerHandler::FolderType type=PresetPlayerHandler::GlobalSampleDirectory)
 

Detailed Description

A Processor that uses an external file for something.

Whenever you need to use a external file (eg. an audio file or an image), subclass your Processor from this class. It will handle all file management issues:

  1. In Backend mode, it will resolve the project path.
  2. In Frontend mode, it will retrieve the file content from the embedded data.

Member Function Documentation

File getFile ( const String &  fileNameOrReference,
PresetPlayerHandler::FolderType  type = PresetPlayerHandler::GlobalSampleDirectory 
)

Call this to get the file for the string.

Whenever you want to read a file, use this method instead of the direct File constructor, so it will parse a global file expression to the local global folder.

String getGlobalReferenceForFile ( const String &  file,
PresetPlayerHandler::FolderType  type = PresetPlayerHandler::GlobalSampleDirectory 
)

This will return a expression which can be stored instead of the actual filename. If you load the file using the getFile() method, it will look in the global sample folder.

virtual void replaceReferencesWithGlobalFolder ( )
pure virtual

Overwrite this method and replace all internal references with a global file expression (use getGlobalReferenceForFile())

You don't need to reload the data, it will be loaded from the global folder the next time you load the patch.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.