author | wimpie <wimpie> | 2004-04-02 23:07:50 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-02 23:07:50 (UTC) |
commit | e7a821c21c684c30dbc67db3a1ef341cedc18a1f (patch) (unidiff) | |
tree | 930b743e1b5363c4d76735efe5eac0e4659d8afd | |
parent | aeb8f96f5551d5e8d5643c0d2fa0894cd80e511b (diff) | |
download | opie-e7a821c21c684c30dbc67db3a1ef341cedc18a1f.zip opie-e7a821c21c684c30dbc67db3a1ef341cedc18a1f.tar.gz opie-e7a821c21c684c30dbc67db3a1ef341cedc18a1f.tar.bz2 |
added _sdf(0) to constructor to avoid warning
-rw-r--r-- | libopie2/opiemm/osoundsystem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp index 07f26c0..c00585d 100644 --- a/libopie2/opiemm/osoundsystem.cpp +++ b/libopie2/opiemm/osoundsystem.cpp | |||
@@ -86,129 +86,129 @@ void OSoundSystem::synchronize() | |||
86 | OAudioInterface* iface; | 86 | OAudioInterface* iface; |
87 | iface = new OAudioInterface( this, (const char*) str ); | 87 | iface = new OAudioInterface( this, (const char*) str ); |
88 | 88 | ||
89 | _interfaces.insert( str, iface ); | 89 | _interfaces.insert( str, iface ); |
90 | s.readLine(); | 90 | s.readLine(); |
91 | } | 91 | } |
92 | */ | 92 | */ |
93 | } | 93 | } |
94 | 94 | ||
95 | 95 | ||
96 | int OSoundSystem::count() const | 96 | int OSoundSystem::count() const |
97 | { | 97 | { |
98 | return _interfaces.count(); | 98 | return _interfaces.count(); |
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | OSoundCard* OSoundSystem::card( const QString& iface ) const | 102 | OSoundCard* OSoundSystem::card( const QString& iface ) const |
103 | { | 103 | { |
104 | return _interfaces[iface]; | 104 | return _interfaces[iface]; |
105 | } | 105 | } |
106 | 106 | ||
107 | 107 | ||
108 | OSoundSystem* OSoundSystem::instance() | 108 | OSoundSystem* OSoundSystem::instance() |
109 | { | 109 | { |
110 | if ( !_instance ) _instance = new OSoundSystem(); | 110 | if ( !_instance ) _instance = new OSoundSystem(); |
111 | return _instance; | 111 | return _instance; |
112 | } | 112 | } |
113 | 113 | ||
114 | 114 | ||
115 | OSoundSystem::CardIterator OSoundSystem::iterator() const | 115 | OSoundSystem::CardIterator OSoundSystem::iterator() const |
116 | { | 116 | { |
117 | return OSoundSystem::CardIterator( _interfaces ); | 117 | return OSoundSystem::CardIterator( _interfaces ); |
118 | } | 118 | } |
119 | 119 | ||
120 | 120 | ||
121 | /*====================================================================================== | 121 | /*====================================================================================== |
122 | * OSoundCard | 122 | * OSoundCard |
123 | *======================================================================================*/ | 123 | *======================================================================================*/ |
124 | 124 | ||
125 | OSoundCard::OSoundCard( QObject* parent, const char* name ) | 125 | OSoundCard::OSoundCard( QObject* parent, const char* name ) |
126 | :QObject( parent, name ), _audio( 0 ), _mixer( 0 ) | 126 | :QObject( parent, name ), _audio( 0 ), _mixer( 0 ) |
127 | { | 127 | { |
128 | odebug << "OSoundCard::OSoundCard()" << oendl; | 128 | odebug << "OSoundCard::OSoundCard()" << oendl; |
129 | init(); | 129 | init(); |
130 | } | 130 | } |
131 | 131 | ||
132 | 132 | ||
133 | OSoundCard::~OSoundCard() | 133 | OSoundCard::~OSoundCard() |
134 | { | 134 | { |
135 | } | 135 | } |
136 | 136 | ||
137 | 137 | ||
138 | void OSoundCard::init() | 138 | void OSoundCard::init() |
139 | { | 139 | { |
140 | _audio = new OAudioInterface( this, "/dev/dsp" ); | 140 | _audio = new OAudioInterface( this, "/dev/dsp" ); |
141 | _mixer = new OMixerInterface( this, "/dev/mixer" ); | 141 | _mixer = new OMixerInterface( this, "/dev/mixer" ); |
142 | } | 142 | } |
143 | 143 | ||
144 | 144 | ||
145 | /*====================================================================================== | 145 | /*====================================================================================== |
146 | * OAudioInterface | 146 | * OAudioInterface |
147 | *======================================================================================*/ | 147 | *======================================================================================*/ |
148 | 148 | ||
149 | OAudioInterface::OAudioInterface( QObject* parent, const char* name ) | 149 | OAudioInterface::OAudioInterface( QObject* parent, const char* name ) |
150 | :QObject( parent, name ) | 150 | :QObject( parent, name ), _sfd(0) |
151 | { | 151 | { |
152 | odebug << "OAudioInterface::OAudioInterface()" << oendl; | 152 | odebug << "OAudioInterface::OAudioInterface()" << oendl; |
153 | init(); | 153 | init(); |
154 | } | 154 | } |
155 | 155 | ||
156 | 156 | ||
157 | OAudioInterface::~OAudioInterface() | 157 | OAudioInterface::~OAudioInterface() |
158 | { | 158 | { |
159 | } | 159 | } |
160 | 160 | ||
161 | 161 | ||
162 | void OAudioInterface::init() | 162 | void OAudioInterface::init() |
163 | { | 163 | { |
164 | 164 | ||
165 | 165 | ||
166 | } | 166 | } |
167 | 167 | ||
168 | 168 | ||
169 | /*====================================================================================== | 169 | /*====================================================================================== |
170 | * OMixerInterface | 170 | * OMixerInterface |
171 | *======================================================================================*/ | 171 | *======================================================================================*/ |
172 | 172 | ||
173 | OMixerInterface::OMixerInterface( QObject* parent, const char* name ) | 173 | OMixerInterface::OMixerInterface( QObject* parent, const char* name ) |
174 | :QObject( parent, name ) | 174 | :QObject( parent, name ) |
175 | { | 175 | { |
176 | odebug << "OMixerInterface::OMixerInterface()" << oendl; | 176 | odebug << "OMixerInterface::OMixerInterface()" << oendl; |
177 | init(); | 177 | init(); |
178 | } | 178 | } |
179 | 179 | ||
180 | 180 | ||
181 | OMixerInterface::~OMixerInterface() | 181 | OMixerInterface::~OMixerInterface() |
182 | { | 182 | { |
183 | } | 183 | } |
184 | 184 | ||
185 | 185 | ||
186 | void OMixerInterface::init() | 186 | void OMixerInterface::init() |
187 | { | 187 | { |
188 | // open the device | 188 | // open the device |
189 | _fd = ::open( name(), O_RDWR ); | 189 | _fd = ::open( name(), O_RDWR ); |
190 | if ( _fd == -1 ) | 190 | if ( _fd == -1 ) |
191 | { | 191 | { |
192 | owarn << "OMixerInterface::init(): Can't open mixer." << oendl; | 192 | owarn << "OMixerInterface::init(): Can't open mixer." << oendl; |
193 | return; | 193 | return; |
194 | } | 194 | } |
195 | 195 | ||
196 | // construct the device capabilities | 196 | // construct the device capabilities |
197 | int devmask = 0; | 197 | int devmask = 0; |
198 | if ( ioctl( _fd, SOUND_MIXER_READ_DEVMASK, &devmask ) != -1 ) | 198 | if ( ioctl( _fd, SOUND_MIXER_READ_DEVMASK, &devmask ) != -1 ) |
199 | { | 199 | { |
200 | if ( devmask & ( 1 << SOUND_MIXER_VOLUME ) ) _channels.insert( "PlayVolume", SOUND_MIXER_VOLUME ); | 200 | if ( devmask & ( 1 << SOUND_MIXER_VOLUME ) ) _channels.insert( "PlayVolume", SOUND_MIXER_VOLUME ); |
201 | if ( devmask & ( 1 << SOUND_MIXER_BASS ) ) _channels.insert( "PlayBass", SOUND_MIXER_BASS ); | 201 | if ( devmask & ( 1 << SOUND_MIXER_BASS ) ) _channels.insert( "PlayBass", SOUND_MIXER_BASS ); |
202 | if ( devmask & ( 1 << SOUND_MIXER_TREBLE ) ) _channels.insert( "PlayTreble", SOUND_MIXER_TREBLE ); | 202 | if ( devmask & ( 1 << SOUND_MIXER_TREBLE ) ) _channels.insert( "PlayTreble", SOUND_MIXER_TREBLE ); |
203 | if ( devmask & ( 1 << SOUND_MIXER_SYNTH ) ) _channels.insert( "PlaySynth", SOUND_MIXER_SYNTH ); | 203 | if ( devmask & ( 1 << SOUND_MIXER_SYNTH ) ) _channels.insert( "PlaySynth", SOUND_MIXER_SYNTH ); |
204 | if ( devmask & ( 1 << SOUND_MIXER_PCM ) ) _channels.insert( "PlayPCM", SOUND_MIXER_PCM ); | 204 | if ( devmask & ( 1 << SOUND_MIXER_PCM ) ) _channels.insert( "PlayPCM", SOUND_MIXER_PCM ); |
205 | if ( devmask & ( 1 << SOUND_MIXER_SPEAKER ) ) _channels.insert( "PlaySpeaker", SOUND_MIXER_SPEAKER ); | 205 | if ( devmask & ( 1 << SOUND_MIXER_SPEAKER ) ) _channels.insert( "PlaySpeaker", SOUND_MIXER_SPEAKER ); |
206 | if ( devmask & ( 1 << SOUND_MIXER_LINE ) ) _channels.insert( "PlayLine", SOUND_MIXER_LINE ); | 206 | if ( devmask & ( 1 << SOUND_MIXER_LINE ) ) _channels.insert( "PlayLine", SOUND_MIXER_LINE ); |
207 | if ( devmask & ( 1 << SOUND_MIXER_MIC ) ) _channels.insert( "PlayMic", SOUND_MIXER_MIC ); | 207 | if ( devmask & ( 1 << SOUND_MIXER_MIC ) ) _channels.insert( "PlayMic", SOUND_MIXER_MIC ); |
208 | if ( devmask & ( 1 << SOUND_MIXER_CD ) ) _channels.insert( "PlayCD", SOUND_MIXER_CD ); | 208 | if ( devmask & ( 1 << SOUND_MIXER_CD ) ) _channels.insert( "PlayCD", SOUND_MIXER_CD ); |
209 | if ( devmask & ( 1 << SOUND_MIXER_IMIX ) ) _channels.insert( "PlayInputMix", SOUND_MIXER_IMIX ); | 209 | if ( devmask & ( 1 << SOUND_MIXER_IMIX ) ) _channels.insert( "PlayInputMix", SOUND_MIXER_IMIX ); |
210 | if ( devmask & ( 1 << SOUND_MIXER_ALTPCM ) ) _channels.insert( "PlayAltPCM", SOUND_MIXER_ALTPCM ); | 210 | if ( devmask & ( 1 << SOUND_MIXER_ALTPCM ) ) _channels.insert( "PlayAltPCM", SOUND_MIXER_ALTPCM ); |
211 | if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "PlayRecord", SOUND_MIXER_RECLEV ); | 211 | if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "PlayRecord", SOUND_MIXER_RECLEV ); |
212 | if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "PlayInputGain", SOUND_MIXER_IGAIN ); | 212 | if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "PlayInputGain", SOUND_MIXER_IGAIN ); |
213 | if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "PlayOutputGain", SOUND_MIXER_OGAIN ); | 213 | if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "PlayOutputGain", SOUND_MIXER_OGAIN ); |
214 | //odebug << "devmask available and constructed." << oendl; | 214 | //odebug << "devmask available and constructed." << oendl; |