Changeset 5001
- Timestamp:
- 09/10/07 11:13:06 (6 years ago)
- Location:
- experimental/components/Sound/trunk/Sound-metadata
- Files:
-
- 7 modified
-
Doxyfile (modified) (11 diffs)
-
src/SoundCapture.cpp (modified) (2 diffs)
-
src/SoundCapture.h (modified) (1 diff)
-
src/SoundPlayback.cpp (modified) (3 diffs)
-
src/SoundPlayback.h (modified) (4 diffs)
-
src/main_capture.cpp (modified) (3 diffs)
-
src/main_playback.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
experimental/components/Sound/trunk/Sound-metadata/Doxyfile
r5000 r5001 1 # Doxyfile 1. 4.61 # Doxyfile 1.5.2 2 2 3 3 # This file describes the settings to be used by the documentation system … … 15 15 #--------------------------------------------------------------------------- 16 16 17 # This tag specifies the encoding used for all characters in the config file that 18 # follow. The default is UTF-8 which is also the encoding used for all text before 19 # the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 20 # libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 21 # possible encodings. 22 23 DOXYFILE_ENCODING = UTF-8 24 17 25 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded 18 26 # by quotes) that should identify the project. 19 27 20 PROJECT_NAME = "Sound C ard (Capture)"28 PROJECT_NAME = "Sound Component Library" 21 29 22 30 # The PROJECT_NUMBER tag can be used to enter a project or revision number. … … 46 54 # information to generate all constant output in the proper language. 47 55 # The default language is English, other supported languages are: 48 # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,49 # Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,50 # Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,51 # Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,52 # S wedish, and Ukrainian.56 # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 57 # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 58 # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 59 # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 60 # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. 53 61 54 62 OUTPUT_LANGUAGE = English 55 56 # This tag can be used to specify the encoding used in the generated output.57 # The encoding is not always determined by the language that is chosen,58 # but also whether or not the output is meant for Windows or non-Windows users.59 # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES60 # forces the Windows encoding (this is the default for the Windows binary),61 # whereas setting the tag to NO uses a Unix-style encoding (the default for62 # all platforms other than Windows).63 64 USE_WINDOWS_ENCODING = NO65 63 66 64 # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will … … 205 203 BUILTIN_STL_SUPPORT = yes 206 204 205 # If you use Microsoft's C++/CLI language, you should set this option to YES to 206 # enable parsing support. 207 208 CPP_CLI_SUPPORT = NO 209 207 210 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 208 211 # tag is set to YES, then doxygen will reuse the documentation of the first … … 460 463 # with spaces. 461 464 462 INPUT = documentation.txt soundCardCapture.cpp soundCardCapture.h 465 INPUT = documentation.txt \ 466 src/ 467 468 # This tag can be used to specify the character encoding of the source files that 469 # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 470 # input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 471 # See http://www.gnu.org/software/libiconv for the list of possible encodings. 472 473 INPUT_ENCODING = UTF-8 463 474 464 475 # If the value of the INPUT tag contains directories, you can use the … … 496 507 497 508 EXCLUDE_PATTERNS = 509 510 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 511 # (namespaces, classes, functions, etc.) that should be excluded from the output. 512 # The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 513 # a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test 514 515 EXCLUDE_SYMBOLS = 498 516 499 517 # The EXAMPLE_PATH tag can be used to specify one or more files or … … 582 600 REFERENCES_RELATION = YES 583 601 602 # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 603 # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 604 # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 605 # link to the source code. Otherwise they will link to the documentstion. 606 607 REFERENCES_LINK_SOURCE = YES 608 584 609 # If the USE_HTAGS tag is set to YES then the references to source code 585 610 # will point to the HTML generated by the htags(1) tool instead of doxygen … … 659 684 # stylesheet in the HTML output directory as well, or it will be erased! 660 685 661 HTML_STYLESHEET = 686 HTML_STYLESHEET = 662 687 663 688 # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, … … 1079 1104 CLASS_DIAGRAMS = YES 1080 1105 1106 # You can define message sequence charts within doxygen comments using the \msc 1107 # command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 1108 # produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 1109 # specify the directory where the mscgen tool resides. If left empty the tool is assumed to 1110 # be found in the default search path. 1111 1112 MSCGEN_PATH = 1113 1081 1114 # If set to YES, the inheritance and collaboration graphs will hide 1082 1115 # inheritance and usage relations if the target is undocumented … … 1144 1177 CALL_GRAPH = NO 1145 1178 1179 # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 1180 # generate a caller dependency graph for every global function or class method. 1181 # Note that enabling this option will significantly increase the time of a run. 1182 # So in most cases it will be better to enable caller graphs for selected 1183 # functions only using the \callergraph command. 1184 1185 CALLER_GRAPH = NO 1186 1146 1187 # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 1147 1188 # will graphical hierarchy of all classes instead of a textual one. … … 1173 1214 DOTFILE_DIRS = 1174 1215 1175 # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 1176 # (in pixels) of the graphs generated by dot. If a graph becomes larger than 1177 # this value, doxygen will try to truncate the graph, so that it fits within 1178 # the specified constraint. Beware that most browsers cannot cope with very 1179 # large images. 1180 1181 MAX_DOT_GRAPH_WIDTH = 1024 1182 1183 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 1184 # (in pixels) of the graphs generated by dot. If a graph becomes larger than 1185 # this value, doxygen will try to truncate the graph, so that it fits within 1186 # the specified constraint. Beware that most browsers cannot cope with very 1187 # large images. 1188 1189 MAX_DOT_GRAPH_HEIGHT = 1024 1190 1191 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 1192 # graphs generated by dot. A depth value of 3 means that only nodes reachable 1193 # from the root by following a path via at most 3 edges will be shown. Nodes 1194 # that lay further from the root node will be omitted. Note that setting this 1195 # option to 1 or 2 may greatly reduce the computation time needed for large 1196 # code bases. Also note that a graph may be further truncated if the graph's 1197 # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH 1198 # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), 1199 # the graph is not depth-constrained. 1200 1201 MAX_DOT_GRAPH_DEPTH = 0 1216 # The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 1217 # nodes that will be shown in the graph. If the number of nodes in a graph 1218 # becomes larger than this value, doxygen will truncate the graph, which is 1219 # visualized by representing a node as a red box. Note that doxygen will always 1220 # show the root nodes and its direct children regardless of this setting. 1221 1222 DOT_GRAPH_MAX_NODES = 50 1202 1223 1203 1224 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -
experimental/components/Sound/trunk/Sound-metadata/src/SoundCapture.cpp
r5000 r5001 29 29 30 30 // Initializing constructor 31 SoundCapture_i::SoundCapture_i(c har *uuid, char *label, char *profile, omni_condition *condition)32 : Device_impl(uuid, label, profile), component_running(condition), isRunning(false)31 SoundCapture_i::SoundCapture_i(const char *uuid, omni_condition *condition) 32 : Resource_impl(uuid), component_running(condition) 33 33 { 34 34 DEBUG(3, SoundCapture, "constructor invoked") … … 45 45 SoundCapture_i::~SoundCapture_i() 46 46 { 47 47 delete dataOut; 48 48 } 49 49 -
experimental/components/Sound/trunk/Sound-metadata/src/SoundCapture.h
r5000 r5001 33 33 #include "ossie/cf.h" 34 34 #include "ossie/PortTypes.h" 35 #include "ossie/Device_impl.h"36 35 #include "ossie/Resource_impl.h" 37 36 #include "ossie/debug.h" 38 37 39 #include "standardinterfaces/complexShort.h"40 38 #include "standardinterfaces/complexShort_u.h" 41 39 42 40 #include <alsa/asoundlib.h> 43 41 44 /// Main sound ca rd device (capture)definition45 class SoundCapture_i : public virtual Device_impl42 /// Main sound capture definition 43 class SoundCapture_i : public virtual Resource_impl 46 44 { 47 45 public: 46 /// Initializing constructor 47 SoundCapture_i(const char *uuid, omni_condition *sem); 48 48 49 /// Initializing constructor (old) 49 50 SoundCapture_i(char *uuid, char* label, char* profile, omni_condition *condition); -
experimental/components/Sound/trunk/Sound-metadata/src/SoundPlayback.cpp
r5000 r5001 29 29 #include <iostream> 30 30 31 #include "ossie/cf.h"32 #include "ossie/portability.h"33 34 31 #include "SoundPlayback.h" 35 32 36 33 // Initializing constructor 37 SoundPlayback_i::SoundPlayback_i(c har *id, char *label, char *profile)38 : Device_impl(id, label, profile), insert_idx(2), read_idx(0), length(0), data_available(&wait_for_data)34 SoundPlayback_i::SoundPlayback_i(const char *uuid, omni_condition *condition) 35 : Resource_impl(uuid), component_running(condition) 39 36 { 40 37 DEBUG(3, SoundPlayback, "constructor invoked") 38 39 // Create port for input sound samples 40 dataIn = new standardInterfaces_i::complexShort_p("bitsIn"); 41 41 42 42 // initialize variables … … 44 44 45 45 // Start the play_sound thread 46 sound_thread = new omni_thread(run, (void *) this);47 sound_thread->start();46 processing_thread = new omni_thread(run, (void *) this); 47 processing_thread->start(); 48 48 } 49 49 … … 77 77 { 78 78 DEBUG(3, SoundPlayback, "getPort() invoked with : " << portName) 79 80 CORBA::Object_var p; 81 82 p = dataIn->getPort(portName); 83 84 if (!CORBA::is_nil(p)) 85 return p._retn(); 86 87 // Port not found; throw exception 88 throw CF::PortSupplier::UnknownPort(); 89 79 90 } 80 91 -
experimental/components/Sound/trunk/Sound-metadata/src/SoundPlayback.h
r5000 r5001 27 27 */ 28 28 29 #include <stdlib.h> 29 30 #include <omnithread.h> 30 31 #include <alsa/asoundlib.h> … … 32 33 #include "ossie/cf.h" 33 34 #include "ossie/PortTypes.h" 35 #include "ossie/Resource_impl.h" 34 36 #include "ossie/debug.h" 35 37 36 #include "soundControl.h" 37 #include "complexShort.h" 38 #include "standardinterfaces/complexShort_p.h" 38 39 39 #include "ossie/Device_impl.h" 40 41 /// Main Sound card device definition 42 class SoundPlayback_i : public virtual Device_impl 43 40 /// Main sound playback definition 41 class SoundPlayback_i : public virtual Resource_impl 44 42 { 45 43 public: 46 44 /// Initializing constructor 47 SoundPlayback_i(c har *id, char *label, char *profile);45 SoundPlayback_i(const char *uuid, omni_condition *sem); 48 46 49 47 /// Default destructor … … 83 81 throw (CF::LifeCycle::ReleaseError, CORBA::SystemException); 84 82 83 private: 84 /// Disallowing default constructor 85 SoundPlayback_i(); 86 87 /// Disallowing copy constructor 88 SoundPlayback_i(SoundPlayback_i&); 89 90 /// Main processing playback loop 91 void play_sound(); 92 93 omni_condition *component_running; ///< for component shutdown 94 omni_thread *processing_thread; ///< for component writer function 95 96 /// Port: input sound samples 97 standardInterfaces_i::complexShort_p *dataIn; 98 85 99 // --- Sound playback variables --- 86 100 87 ///88 101 snd_pcm_t *pcm_handle; 89 90 ///91 102 snd_pcm_uframes_t periodsize; 92 103 … … 99 110 unsigned int length; 100 111 101 /// Sound playback thread102 omni_thread *sound_thread;103 104 private:105 /// Disallowing default constructor106 SoundPlayback_i();107 108 /// Disallowing copy constructor109 SoundPlayback_i(SoundPlayback_i&);110 111 /// Main processing playback loop112 void play_sound();113 114 112 }; 115 113 -
experimental/components/Sound/trunk/Sound-metadata/src/main_capture.cpp
r5000 r5001 1 1 /**************************************************************************** 2 2 3 Copyright 200 5,2006 Virginia Polytechnic Institute and State University3 Copyright 2006 Virginia Polytechnic Institute and State University 4 4 5 This file is part of the OSSIE SoundCa rdCapture.5 This file is part of the OSSIE SoundCapture. 6 6 7 OSSIE SoundCa rdCapture is free software; you can redistribute it and/or modify7 OSSIE SoundCapture is free software; you can redistribute it and/or modify 8 8 it under the terms of the GNU General Public License as published by 9 9 the Free Software Foundation; either version 2 of the License, or 10 10 (at your option) any later version. 11 11 12 OSSIE SoundCa rdCapture is distributed in the hope that it will be useful,12 OSSIE SoundCapture is distributed in the hope that it will be useful, 13 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 16 16 17 17 You should have received a copy of the GNU General Public License 18 along with OSSIE SoundCa rdCapture; if not, write to the Free Software18 along with OSSIE SoundCapture; if not, write to the Free Software 19 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 … … 22 22 23 23 #include <iostream> 24 #include <string>25 26 #include "ossie/debug.h"27 24 #include "ossie/ossieSupport.h" 28 25 29 #include " soundCardCapture.h"26 #include "SoundCapture.h" 30 27 31 int main(int argc, char *argv[]) 28 using namespace std; 29 using namespace standardInterfaces; // For standard OSSIE interface classes 30 31 32 int main(int argc, char* argv[]) 32 33 33 34 { 34 ossieDebugLevel = 3; 35 ossieSupport::ORB *orb = new ossieSupport::ORB; 36 omni_mutex component_running_mutex; 37 omni_condition *component_running = new omni_condition(&component_running_mutex); 35 38 36 ossieSupport::ORB* orbsup = new ossieSupport::ORB(); 37 38 char *id, *profile, *label; 39 40 if (argc != 4) { 41 std::cout << argv[0] << " : <identifier> <name> <SPD Profile>" << std::endl; 42 exit(-1); 39 if (argc != 3) { 40 cout << argv[0] << " <id> <usage name> " << endl; 41 exit (-1); 43 42 } 44 43 45 id = argv[1]; 46 label = argv[2]; 47 profile = argv[3]; 44 char *uuid = argv[1]; 45 char *label = argv[2]; 48 46 49 DEBUG(1, SoundCardCapture, "Identifier = " << id << "Label = " << label << " Profile = " << profile)47 cout << "Identifier - " << uuid << " Label - " << label << endl; 50 48 49 SoundCapture_i* soundcapture_servant; 50 CF::Resource_var soundcapture_var; 51 51 52 // Create Executable device servant and object reference 53 SoundCardCapture_i* SoundCardCapture_servant; 54 CF::ExecutableDevice_var SoundCardCapture_var; 52 // Create the soundcapture component servant and object reference 55 53 56 SoundCardCapture_servant = new SoundCardCapture_i(id, label, profile);57 SoundCardCapture_var = SoundCardCapture_servant->_this();54 soundcapture_servant = new SoundCapture_i(uuid, component_running); 55 soundcapture_var = soundcapture_servant->_this(); 58 56 59 // Add the object to the Naming Service 60 string objName = "DomainName1/"; 61 objName += label; 57 orb->bind_object_to_name((CORBA::Object_ptr) soundcapture_var, label); 62 58 63 orbsup->bind_object_to_name((CORBA::Object_ptr) SoundCardCapture_var, objName.c_str()); 59 // This bit is ORB specific 60 // omniorb is threaded and the servants are running at this point 61 // so we block on the condition 62 // The releaseObject method clear the condition and the component exits 64 63 65 // Start handling CORBA requests 66 orbsup->orb->run(); 64 component_running->wait(); 65 orb->unbind_name(label); 66 orb->orb->shutdown(0); 67 67 68 } -
experimental/components/Sound/trunk/Sound-metadata/src/main_playback.cpp
r5000 r5001 3 3 Copyright 2006 Virginia Polytechnic Institute and State University 4 4 5 This file is part of the OSSIE Sound _out Device.5 This file is part of the OSSIE SoundPlayback. 6 6 7 OSSIE Sound _out Deviceis free software; you can redistribute it and/or modify7 OSSIE SoundPlayback is free software; you can redistribute it and/or modify 8 8 it under the terms of the GNU General Public License as published by 9 9 the Free Software Foundation; either version 2 of the License, or 10 10 (at your option) any later version. 11 11 12 OSSIE Sound _out Deviceis distributed in the hope that it will be useful,12 OSSIE SoundPlayback is distributed in the hope that it will be useful, 13 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 16 16 17 17 You should have received a copy of the GNU General Public License 18 along with OSSIE Sound _out Device; if not, write to the Free Software18 along with OSSIE SoundPlayback; if not, write to the Free Software 19 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 21 20 22 21 ****************************************************************************/ … … 25 24 #include "ossie/ossieSupport.h" 26 25 27 #include " soundCardPlayback.h"26 #include "SoundPlayback.h" 28 27 29 28 using namespace std; … … 34 33 35 34 { 36 ossieDebugLevel = 3; 35 ossieSupport::ORB *orb = new ossieSupport::ORB; 36 omni_mutex component_running_mutex; 37 omni_condition *component_running = new omni_condition(&component_running_mutex); 37 38 38 ossieSupport::ORB *orb = new ossieSupport::ORB; 39 40 if (argc != 4) { 41 cout << argv[0] << " <identifier> <usage name> <software profile>" << endl; 42 exit (-1); 39 if (argc != 3) { 40 cout << argv[0] << " <id> <usage name> " << endl; 41 exit (-1); 43 42 } 44 43 45 char * id = argv[1];44 char *uuid = argv[1]; 46 45 char *label = argv[2]; 47 char *profile = argv[3];48 46 47 cout << "Identifier - " << uuid << " Label - " << label << endl; 49 48 50 Sound CardPlayback_i* soundCardPlayback_servant;51 CF:: Device_var soundCardPlayback_var;49 SoundPlayback_i* soundplayback_servant; 50 CF::Resource_var soundplayback_var; 52 51 53 // Create the Sound Card deviceservant and object reference52 // Create the soundplayback component servant and object reference 54 53 55 sound CardPlayback_servant = new SoundCardPlayback_i(id, label, profile);56 sound CardPlayback_var = soundCardPlayback_servant->_this();54 soundplayback_servant = new SoundPlayback_i(uuid, component_running); 55 soundplayback_var = soundplayback_servant->_this(); 57 56 58 string objName = "DomainName1/"; 59 objName += label; 60 orb->bind_object_to_name((CORBA::Object_ptr) soundCardPlayback_var, objName.c_str()); 57 orb->bind_object_to_name((CORBA::Object_ptr) soundplayback_var, label); 61 58 62 // Create control ports for sound in and out control 59 // This bit is ORB specific 60 // omniorb is threaded and the servants are running at this point 61 // so we block on the condition 62 // The releaseObject method clear the condition and the component exits 63 63 64 soundOutControl_i* soundOutControl_servant; 65 audioOutControl_var soundOutControl_var; 66 67 soundOutControl_servant = new soundOutControl_i(); 68 soundOutControl_var = soundOutControl_servant->_this(); 69 70 soundInControl_i* soundInControl_servant; 71 audioInControl_var soundInControl_var; 72 73 soundInControl_servant = new soundInControl_i(); 74 soundInControl_var = soundInControl_servant->_this(); 75 76 objName = "DomainName1/"; 77 objName += "soundOutControl"; 78 orb->bind_object_to_name((CORBA::Object_ptr) soundOutControl_var, objName.c_str()); 79 80 objName = "DomainName1/"; 81 objName += "soundInControl"; 82 orb->bind_object_to_name((CORBA::Object_ptr) soundInControl_var, objName.c_str()); 83 84 85 // Create the ports for sound output data 86 87 soundOut_i* soundOut; 88 89 complexShort_var soundOut_var; 90 91 soundOut = new soundOut_i(soundCardPlayback_servant); 92 soundOut_var = soundOut->_this(); 93 94 objName = "DomainName1/"; 95 objName += "soundOut"; 96 orb->bind_object_to_name((CORBA::Object_ptr) soundOut_var, objName.c_str()); 97 98 #if 0 // Save for when I need to input from souncard 99 // Create the ports for RX Data 100 101 RX_data_i *rx_data_1; 102 103 CF::Port_var rx_data_1_var; 104 105 rx_data_1 = new RX_data_i(1); 106 107 rx_data_1_var = rx_data_1->_this(); 108 109 objName = "DomainName1/"; 110 objName += "RX_Data_1"; 111 orb->bind_object_to_name((CORBA::Object_var) rx_data_1_var, objName.c_str()); 112 #endif 113 114 // Start the orb 115 orb->orb->run(); 64 component_running->wait(); 65 orb->unbind_name(label); 66 orb->orb->shutdown(0); 116 67 117 68 }