الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

Sound - Splice

مغلق
بدأه mmm43 في 5 نوفمبر 2009 · 1 رد · 421 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكــم ورحمـة الله وبركاتــه

اخواني أتمنى منكم مساعدتي في الحصول على برنامج بلغة الجافا عن كيفية دمج صوتين

وهذا جزء من الكود ممكن يساعدكمsond splice والمسمى

public void splice() {

Sound sound1 =

new Sound(FileChooser.getMediaPath("guzdial.wav"));

Sound sound2 =

new Sound(FileChooser.getMediaPath("is.wav"));

int targetIndex = 0; // the starting place on the target

int value = 0;

// copy all of sound 1 into the current sound (target)

for (int i = 0;

i < sound1.getLength();

i++, targetIndex++)

{

value = sound1.getSampleValueAt(i);

this.setSampleValueAt(targetIndex,value);

}

//create silence between words by setting values to 0

for (int i = 0;

i < (int) (this.getSamplingRate() * 0.1);

i++, targetIndex++)

{

this.setSampleValueAt(targetIndex,0);

}

http://' target="_blank">[Page 299] //copy all of sound 2 into the current sound (target)

for (int i = 0;

i < sound2.getLength();

i++, targetIndex++)

{

value = sound2.getSampleValueAt(i);

this.setSampleValueAt(targetIndex,value);

}

}

To test this we need a "blank" sound that the two sounds will be copied to. You can use the file "sec3silence.wav" for this. It holds 3 seconds of silence, which should be more than enough

#2

يساعدنا جيد جيد

لا أعتقد أنا نحتاج مساعدة

الموضوع مخالف لقوانين المنتدى فقرة طلب حل واجب

تحياتي

حزمة المحرك الإصدارة 0.8

أي أحد يجد أني ظلمته فليراسلني

وبإذن الله لو كان له حق سيأخذه

728x90.png

هذا الموضوع مغلق.

مواضيع مشابهة