/[svn]/linuxsampler/trunk/src/network/lscpserver.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscpserver.h

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

revision 53 by schoenebeck, Mon Apr 26 17:15:51 2004 UTC revision 159 by capela, Tue Jun 29 21:11:50 2004 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003 by Benno Senoner and Christian Schoenebeck         *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *                                                                         *   *                                                                         *
7   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
8   *   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 57  class LSCPServer : public Thread { Line 57  class LSCPServer : public Thread {
57          LSCPServer(Sampler* pSampler);          LSCPServer(Sampler* pSampler);
58    
59          // Methods called by the parser          // Methods called by the parser
60          String LoadInstrument(String Filename, uint uiInstrument, uint uiSamplerChannel);          String DestroyAudioOutputDevice(uint DeviceIndex);
61            String DestroyMidiInputDevice(uint DeviceIndex);
62            String LoadInstrument(String Filename, uint uiInstrument, uint uiSamplerChannel, bool bBackground = false);
63          String LoadEngine(String EngineName, uint uiSamplerChannel);          String LoadEngine(String EngineName, uint uiSamplerChannel);
64          String GetChannels();          String GetChannels();
65          String AddChannel();          String AddChannel();
# Line 68  class LSCPServer : public Thread { Line 70  class LSCPServer : public Thread {
70          String GetVoiceCount(uint uiSamplerChannel);          String GetVoiceCount(uint uiSamplerChannel);
71          String GetStreamCount(uint uiSamplerChannel);          String GetStreamCount(uint uiSamplerChannel);
72          String GetBufferFill(fill_response_t ResponseType, uint uiSamplerChannel);          String GetBufferFill(fill_response_t ResponseType, uint uiSamplerChannel);
73          String SetAudioOutputType(audio_output_type_t AudioOutputType, uint uiSamplerChannel);          String GetAvailableAudioOutputDrivers();
74          String SetAudioOutputChannel(uint AudioOutputChannel, uint uiSamplerChannel);          String GetAvailableMidiInputDrivers();
75          String SetMIDIInputType(midi_input_type_t MidiInputType, uint uiSamplerChannel);          String GetAudioOutputDriverInfo(String Driver);
76          String SetMIDIInputPort(String MIDIInputPort, uint uiSamplerchannel);          String GetMidiInputDriverInfo(String Driver);
77    #ifdef __GNUC__
78            typedef std::map<String,String> StringMap; // nasty workaround for a GCC bug (see GCC bug #15980, #57)
79            String GetAudioOutputDriverParameterInfo(String Driver, String Parameter, std::map<String,String> DependencyList = StringMap());
80            String GetMidiInputDriverParameterInfo(String Driver, String Parameter, std::map<String,String> DependencyList = StringMap());
81            String CreateAudioOutputDevice(String Driver, std::map<String,String> Parameters = StringMap());
82            String CreateMidiInputDevice(String Driver, std::map<String,String> Parameters = StringMap());
83    #else
84            String GetAudioOutputDriverParameterInfo(String Driver, String Parameter, std::map<String,String> DependencyList = std::map<String,String>());
85            String GetMidiInputDriverParameterInfo(String Driver, String Parameter, std::map<String,String> DependencyList = std::map<String,String>());
86            String CreateAudioOutputDevice(String Driver, std::map<String,String> Parameters = std::map<String,String>());
87            String CreateMidiInputDevice(String Driver, std::map<String,String> Parameters = std::map<String,String>());
88    #endif // __GNUC__
89            String GetAudioOutputDeviceCount();
90            String GetMidiInputDeviceCount();
91            String GetAudioOutputDevices();
92            String GetMidiInputDevices();
93            String GetAudioOutputDeviceInfo(uint DeviceIndex);
94            String GetMidiInputDeviceInfo(uint DeviceIndex);
95            String GetMidiInputPortInfo(uint DeviceIndex, uint PortIndex);
96            String GetAudioOutputChannelInfo(uint DeviceId, uint ChannelId);
97            String GetAudioOutputChannelParameterInfo(uint DeviceId, uint ChannelId, String ParameterName);
98            String SetAudioOutputChannelParameter(uint DeviceId, uint ChannelId, String ParamKey, String ParamVal);
99            String SetAudioOutputDeviceParameter(uint DeviceIndex, String ParamKey, String ParamVal);
100            String SetMidiInputDeviceParameter(uint DeviceIndex, String ParamKey, String ParamVal);
101            String SetMidiInputPortParameter(uint DeviceIndex, uint PortIndex, String ParamKey, String ParamVal);
102            String SetAudioOutputChannel(uint ChannelAudioOutputChannel, uint AudioOutputDeviceInputChannel, uint uiSamplerChannel);
103            String SetAudioOutputDevice(uint AudioDeviceId, uint SamplerChannel);
104            String SetAudioOutputType(String AudioOutputDriver, uint uiSamplerChannel);
105            String SetMIDIInputPort(uint MIDIPort, uint uiSamplerChannel);
106          String SetMIDIInputChannel(uint MIDIChannel, uint uiSamplerChannel);          String SetMIDIInputChannel(uint MIDIChannel, uint uiSamplerChannel);
107            String SetMIDIInputDevice(uint MIDIDeviceId, uint uiSamplerChannel);
108            String SetMIDIInputType(String MidiInputDriver, uint uiSamplerChannel);
109            String SetMIDIInput(uint MIDIDeviceId, uint MIDIPort, uint MIDIChannel, uint uiSamplerChannel);
110          String SetVolume(double Volume, uint uiSamplerChannel);          String SetVolume(double Volume, uint uiSamplerChannel);
111          String ResetChannel(uint uiSamplerChannel);          String ResetChannel(uint uiSamplerChannel);
112          String SubscribeNotification(uint UDPPort);          String SubscribeNotification(event_t Event);
113          String UnsubscribeNotification(String SessionID);          String UnsubscribeNotification(event_t Event);
114          void   AnswerClient(String ReturnMessage);          void   AnswerClient(String ReturnMessage);
115      protected:      protected:
116          int            hSocket;          int            hSocket;
# Line 85  class LSCPServer : public Thread { Line 119  class LSCPServer : public Thread {
119    
120          int Main(); ///< Implementation of virtual method from class Thread          int Main(); ///< Implementation of virtual method from class Thread
121      private:      private:
122            
123            /**
124             * Find a created audio output device index.
125             */
126            int GetAudioOutputDeviceIndex (AudioOutputDevice *pDevice);
127            
128            /**
129             * Find a created midi input device index.
130             */
131            int GetMidiInputDeviceIndex (MidiInputDevice *pDevice);
132    
133          /**          /**
134           * Converts a result_t structure into a valid LSCP answer message.           * Converts a result_t structure into a valid LSCP answer message.
135           */           */
# Line 113  class LSCPServer : public Thread { Line 158  class LSCPServer : public Thread {
158          }          }
159  };  };
160    
161    
162    /**
163     * Instrument loader thread for the LinuxSampler Control Protocol (LSCP).
164     */
165    class LSCPLoadInstrument : public Thread {
166    
167        public:
168            LSCPLoadInstrument(Engine* pEngine, String Filename, uint uiInstrument);
169    
170        protected:
171            // Instance variables.
172            Engine* pEngine;
173            String  Filename;
174            uint    uiInstrument;
175    
176            // Implementation of virtual method from class Thread.
177            int Main();
178    };
179    
180  #endif // __LSCPSERVER_H_  #endif // __LSCPSERVER_H_

Legend:
Removed from v.53  
changed lines
  Added in v.159

  ViewVC Help
Powered by ViewVC