FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
volumen en windows
Hi people, necesito ayuda y novia, como puedo controlar el volumen de mi pc desde Delphi???? Os agradeceria cualquier informacion gracias.... a si si es por lo segundo dejame tu mail
|
#2
|
|||
|
|||
Cita:
Referente a la pregunta, quizas este enlace pueda servirte http://msdn.microsoft.com/archive/de...umecontrol.asp |
#3
|
|||
|
|||
gracias cadetill....pero no habria otra forma un poco mas sencilla de subir y bajar el volumen de la musica en mi pc?????? esq tienes q reconocer q es un pokiko complicao......ah a ver si me puedes exar una mano con lo q te he puesto en la seccion de internet...y mu wapo tu teeeesssssssssssooorroooooooooo....
|
#4
|
|||
|
|||
Cita:
Cita:
|
#5
|
|||
|
|||
Hola Aram2r,
respondo por lo primero Un trozo de código que he encontrado por ahí, espero que te sirva, Código:
uses MMSystem; type TVolumeRec = record case Integer of 0: (LongVolume: Longint) ; 1: (LeftVolume, RightVolume : Word) ; end; const DeviceIndex=5 {0:Wave 1:MIDI 2:CDAudio 3:Line-In 4:Microphone 5:Master 6:PC-loudspeaker} procedure SetVolume(aVolume:Byte) ; var Vol: TVolumeRec; begin Vol.LeftVolume := aVolume shl 8; Vol.RightVolume:= Vol.LeftVolume; auxSetVolume(UINT(DeviceIndex), Vol.LongVolume) ; end; function GetVolume:Cardinal; var Vol: TVolumeRec; begin AuxGetVolume(UINT(DeviceIndex),@Vol.LongVolume) ; Result:=(Vol.LeftVolume + Vol.RightVolume) shr 9; end; |
#6
|
|||
|
|||
Yo uso esto para modificar el sonido, la idea es parecida a la respuesta anterior, pero mediante otro metodo
Por cierto, si quieres menos complicacion a la hora de usar estas funciones, sobre todo para las modificaciones, por si usas un TrackBar con esta llamada te evitas todo el rollo. Es simplemente llamar a control de volumen de windows WinExec('SNDVOL32.EXE',SW_SHOWNORMAL); Código:
uses MMSystem; type TVolumeRec = record case Integer of 0: (LongVolume: Longint) ; 1: (LeftVolume, RightVolume : Word) ; end; { Funcion para modificar el sonido } function SetWaveVolume(const AVolume: DWORD): Boolean; var WaveOutCaps: TWAVEOUTCAPS; begin Result := False; if WaveOutGetDevCaps(WAVE_MAPPER, @WaveOutCaps, SizeOf(WaveOutCaps)) = MMSYSERR_NOERROR then if WaveOutCaps.dwSupport and WAVECAPS_VOLUME = WAVECAPS_VOLUME then Result := WaveOutSetVolume(-1, AVolume) = MMSYSERR_NOERROR; end; { Funcion para ver que sonido tiene puesto } function GetWaveVolume(var LVol: DWORD; var RVol: DWORD): Boolean; var WaveOutCaps: TWAVEOUTCAPS; Volume: DWORD; begin Result := False; if WaveOutGetDevCaps(WAVE_MAPPER, @WaveOutCaps, SizeOf if WaveOutCaps.dwSupport and WAVECAPS_VOLUME = WAVECAPS_VOLUME then begin Result := WaveOutGetVolume(-1, @Volume) = MMSYSERR_NOERROR; //Result := WaveOutGetVolume(WAVE_MAPPER, @Volume) = MMSYSERR_NOERROR; LVol := LoWord(Volume); RVol := HiWord(Volume); end; end; |
#7
|
|||
|
|||
Bueno mi gran dilema solucionado , gracias a todos los q me habeis ayudado......bueno ahora vamos a por lo segundo....Quien me ayuda?
|
#8
|
||||
|
||||
Código:
vamos a por lo segundo....Quien me ayuda? Saludos! |
#9
|
|||
|
|||
Algunas aplicaciones pueden subir y bajar el volúmen para sólo los archivos de sonido de esa reproduce, y no para todas. ¿Cómo se puede hacer eso?
|
#10
|
|||
|
|||
hola
Cita:
const DeviceIndex=5 a: const DeviceIndex=3 y esto seria para el auxiliar. Como Pudiera poner El volumen Master y dejar const DeviceIndex=5 |
#11
|
|||
|
|||
Reproductor de audio y Video xD!!
Amigos ayuda porfa
hice un reproductor de Audio y video, en Delphi 7, que objeto de solapa o ficha utilizo? q evento activo o donde inserto el codigo q ahan enviado algunos Gracias. les dejo mi codigo: ***************************************** al insertar el codigo q han enviado no me da errores, q onda? *****************************************
Última edición por vtdeleon fecha: 18-01-2007 a las 20:44:33. |
#12
|
||||
|
||||
#13
|
|||
|
|||
Sr. ÑoÑo
viendolo del lado del programnador eres un 0 a la izquierda, solo pedia un poko de ayuda, sobre delphi, no de como escribir un mensaje o como hacer una pregunta.
gracias de todos modos |
|
|
|