Changeset 6140 in vbox for trunk/src/VBox
- Timestamp:
- Dec 18, 2007 5:20:07 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 26872
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/audio.c
r6117 r6140 87 87 }; 88 88 89 static char *audio_streamname; 90 91 const char *audio_get_stream_name(void) 92 { 93 return audio_streamname; 94 } 95 89 96 struct fixed_settings { 90 97 int enabled; … … 1912 1919 * Validate the config. 1913 1920 */ 1914 if (!CFGMR3AreValuesValid(pCfgHandle, "AudioDriver\0 "))1921 if (!CFGMR3AreValuesValid(pCfgHandle, "AudioDriver\0StreamName\0")) 1915 1922 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 1916 1923 … … 1929 1936 if (VBOX_FAILURE (rc)) 1930 1937 return rc; 1938 1939 rc = CFGMR3QueryStringAlloc (pCfgHandle, "StreamName", &audio_streamname); 1940 if (VBOX_FAILURE (rc)) 1941 audio_streamname = NULL; 1931 1942 1932 1943 rc = AUD_init (pDrvIns, drvname); -
trunk/src/VBox/Devices/Audio/audio.h
r6056 r6140 196 196 #endif 197 197 198 #ifdef VBOX 199 const char *audio_get_stream_name(void); 200 #endif 201 198 202 #endif /* audio.h */ -
trunk/src/VBox/Devices/Audio/pulseaudio.c
r6133 r6140 180 180 const pa_buffer_attr *pBufAttr; 181 181 const pa_sample_spec *pSampSpec; 182 c onst char *pchPCMName = fIn ? "pcm_in" : "pcm_out";182 char achPCMName[64]; 183 183 pa_stream_flags_t flags; 184 184 int ms = fIn ? conf.buffer_msecs_in : conf.buffer_msecs_out; 185 185 const char *stream_name = audio_get_stream_name(); 186 187 RTStrPrintf(achPCMName, sizeof(achPCMName), "%.32s%s%s%s", 188 stream_name ? stream_name : "", 189 stream_name ? " (" : "", 190 fIn ? "pcm_in" : "pcm_out", 191 stream_name ? ")" : ""); 186 192 sspec.rate = req->freq; 187 193 sspec.channels = req->nchannels; … … 206 212 pa_threaded_mainloop_lock(g_pMainLoop); 207 213 208 if (!(pStream = pa_stream_new(g_pContext, pchPCMName, &sspec, &cmap)))209 { 210 LogRel(("Pulse: Cannot create stream %s\n", pchPCMName));214 if (!(pStream = pa_stream_new(g_pContext, achPCMName, &sspec, &cmap))) 215 { 216 LogRel(("Pulse: Cannot create stream %s\n", achPCMName)); 211 217 goto unlock_and_fail; 212 218 } -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r6056 r6140 1345 1345 #endif 1346 1346 } 1347 hrc = pMachine->COMGETTER(Name)(&str); H(); 1348 STR_CONV(); 1349 rc = CFGMR3InsertString(pCfg, "StreamName", psz); RC_CHECK(); 1350 STR_FREE(); 1347 1351 } 1348 1352
Note:
See TracChangeset
for help on using the changeset viewer.