android-developers
[Arriba] [Todas las Listas]

[android-developers] Cómo para utilizar SoundPool setRate

To: Android Developers <android-developers@xxxxxxxxxxxxxxxx>
Subject: [android-developers] Cómo para utilizar SoundPool setRate
From: Patrick <patrick.godeau@xxxxxxxxx>
Date: Mon, 31 Oct 2011 04:22:15 -0700 (PDT)
Delivery-date: Mon, 31 Oct 2011 14:10:10 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:mime-version:date:user-agent:x-http-useragent :message-id:subject:from:to:x-original-sender:reply-to:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=ue0Pv2HaeoCGRKvswSk+sQofmFxUH/Ukj5rsd427Vh8=; b=mBrb5+LI98T0NzShuC38VjVvBkM2sEYmhoHr0OngUkWsJTQJnzRiuXj6+skegp4CTu 0Oxxojf3nhcBIqivtbeuXxfUmB0ytqKBgvxe/88ySthEhttWXZGCYDHMMk8nukEdaoB1 enKuCKoZgIDsQFJaxRUP9J/rIVEPk/UHisAxk=
Envelope-to: traductor@xxxxxxxxxxx
List-archive: <http://groups.google.com/group/android-developers?hl=en_US>
List-help: <http://groups.google.com/support/?hl=en_US>, <mailto:android-developers+help@googlegroups.com>
List-id: <android-developers.googlegroups.com>
List-post: <http://groups.google.com/group/android-developers/post?hl=en_US>, <mailto:android-developers@googlegroups.com>
List-subscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+subscribe@googlegroups.com>
List-unsubscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+unsubscribe@googlegroups.com>
Mailing-list: list android-developers@xxxxxxxxxxxxxxxx; contact android-developers+owners@xxxxxxxxxxxxxxxx
Reply-to: android-developers@xxxxxxxxxxxxxxxx
Sender: android-developers@xxxxxxxxxxxxxxxx
User-agent: G2/1.0
El *Android documentación para *SoundPool dice "la aplicación también puede
alterar el tono por ajustar el *playback índice en real-tiempo para
*doppler o efectos de síntesis". Así que intenté hacer esto, utilizando el
*setRate método para variar *smoothly de uno anota a otro, pero el
resultado es terrible: la variación de sonido es muy *ragged. Aquí es el código
probé. Complacer decirme si hay una manera mejor.

*int *streamId = *soundPool.Juego (*soundId, 1, 1, 1, 0, 1.0*f);
puesto que (*float *x = 0; *x < 1; *x += 0.005)
  #unknown{^*SystemClock.Sueño (10);
  *soundPool.*setRate (*streamId, 1 + *x);
}

-- 
recibiste este mensaje porque eres *subscribed al *Google
Grupos "*Android *Developers" grupo.
A correo a este grupo, envía *email a *android-developers@xxxxxxxxxxxxxxxx
A *unsubscribe de este grupo, envía *email a *android-*developers+unsubscribe@xxxxxxxxxxxxxxxx

Puesto que más opciones, visita este grupo en
*http://grupos.*google.*com/Grupo/*android-*developers?*hl=*en

The Android documentation for SoundPool says "the application can also
alter the pitch by adjusting the playback rate in real-time for
doppler or synthesis effects". So I tried to do this, using the
setRate method to vary smoothly from one note to another, but the
result is awful: the sound variation is very ragged. Here is the code
I tried. Please tell me if there is a better way.

int streamId = soundPool.play (soundId, 1, 1, 1, 0, 1.0f);
for (float x = 0; x < 1; x += 0.005) {
  SystemClock.sleep (10);
  soundPool.setRate (streamId, 1 + x);
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
android-developers+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<Anterior por Tema] Tema Actual [Siguiente por Tema>
  • [android-developers] Cómo para utilizar SoundPool setRate, Patrick <=