diff -ruN javie-0.3.1-src/ch.kuramo.javie.api/META-INF/MANIFEST.MF javie-0.3.2-src/ch.kuramo.javie.api/META-INF/MANIFEST.MF --- javie-0.3.1-src/ch.kuramo.javie.api/META-INF/MANIFEST.MF 2010-01-06 09:42:05.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.api/META-INF/MANIFEST.MF 2010-02-06 19:53:15.000000000 +0900 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Javie API Bundle-SymbolicName: ch.kuramo.javie.api;singleton:=true -Bundle-Version: 0.3.1.qualifier +Bundle-Version: 0.3.2.qualifier Bundle-Vendor: rakusan Export-Package: ch.kuramo.javie.api, ch.kuramo.javie.api.annotations, diff -ruN javie-0.3.1-src/ch.kuramo.javie.app/META-INF/MANIFEST.MF javie-0.3.2-src/ch.kuramo.javie.app/META-INF/MANIFEST.MF --- javie-0.3.1-src/ch.kuramo.javie.app/META-INF/MANIFEST.MF 2010-01-06 09:46:16.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.app/META-INF/MANIFEST.MF 2010-02-06 19:53:15.000000000 +0900 @@ -2,15 +2,15 @@ Bundle-ManifestVersion: 2 Bundle-Name: Javie Application Plug-in Bundle-SymbolicName: ch.kuramo.javie.app; singleton:=true -Bundle-Version: 0.3.1.qualifier +Bundle-Version: 0.3.2.qualifier Bundle-Activator: ch.kuramo.javie.app.Activator Bundle-Vendor: rakusan Require-Bundle: org.eclipse.ui, org.eclipse.ui.console, org.eclipse.core.runtime, - ch.kuramo.javie.api;bundle-version="0.3.1", - ch.kuramo.javie.core;bundle-version="0.3.1", - ch.kuramo.javie.effects;bundle-version="0.3.1", + ch.kuramo.javie.api;bundle-version="0.3.2", + ch.kuramo.javie.core;bundle-version="0.3.2", + ch.kuramo.javie.effects;bundle-version="0.3.2", com.google.code.guice;bundle-version="2.0.0", javassist;bundle-version="3.11.0", org.scannotation;bundle-version="1.0.2", diff -ruN javie-0.3.1-src/ch.kuramo.javie.app/app.product javie-0.3.2-src/ch.kuramo.javie.app/app.product --- javie-0.3.1-src/ch.kuramo.javie.app/app.product 2010-02-05 13:05:14.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.app/app.product 2010-02-06 19:53:15.000000000 +0900 @@ -1,11 +1,11 @@ - + - Javie 0.3.1 + Javie 0.3.2 Copyright (c) 2009,2010 Yoshikazu Kuramochi All rights reserved. @@ -43,7 +43,6 @@ - diff -ruN javie-0.3.1-src/ch.kuramo.javie.app/plugin.xml javie-0.3.2-src/ch.kuramo.javie.app/plugin.xml --- javie-0.3.1-src/ch.kuramo.javie.app/plugin.xml 2010-02-05 13:05:14.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.app/plugin.xml 2010-02-06 19:53:15.000000000 +0900 @@ -13,7 +13,7 @@ + value="Javie 0.3.2 Copyright (c) 2009,2010 Yoshikazu Kuramochi All rights reserved. This product include third party software: Eclipse RCP: http://www.eclipse.org/ FreeType2: http://www.freetype.org/ FTGL: http://sourceforge.net/projects/ftgl/ Guice: http://code.google.com/p/google-guice/ Vecmath: https://vecmath.dev.java.net/ Javassist: http://www.csg.is.titech.ac.jp/~chiba/javassist/ JOGL: http://kenai.com/projects/jogl/ JSONIC: http://jsonic.sourceforge.jp/ JNA: https://jna.dev.java.net/ Scannotation: http://sourceforge.net/projects/scannotation/ SLF4J: http://www.slf4j.org/ Rhino: http://www.mozilla.org/rhino/ Tritonus: http://www.tritonus.org/"> diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/META-INF/MANIFEST.MF javie-0.3.2-src/ch.kuramo.javie.core/META-INF/MANIFEST.MF --- javie-0.3.1-src/ch.kuramo.javie.core/META-INF/MANIFEST.MF 2010-01-28 15:32:23.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/META-INF/MANIFEST.MF 2010-02-06 19:53:15.000000000 +0900 @@ -2,14 +2,14 @@ Bundle-ManifestVersion: 2 Bundle-Name: Javie Core Plug-in Bundle-SymbolicName: ch.kuramo.javie.core;singleton:=true -Bundle-Version: 0.3.1.qualifier +Bundle-Version: 0.3.2.qualifier Bundle-Vendor: rakusan Export-Package: ch.kuramo.javie.core, ch.kuramo.javie.core.misc, ch.kuramo.javie.core.output, ch.kuramo.javie.core.services Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: ch.kuramo.javie.api;bundle-version="0.3.1", +Require-Bundle: ch.kuramo.javie.api;bundle-version="0.3.2", com.google.code.guice;bundle-version="2.0.0", javassist;bundle-version="3.11.0", org.scannotation;bundle-version="1.0.2", diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/AbstractMediaLayer.java javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/AbstractMediaLayer.java --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/AbstractMediaLayer.java 2010-01-21 09:30:20.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/AbstractMediaLayer.java 2010-02-06 16:26:02.000000000 +0900 @@ -531,6 +531,21 @@ _arSupport.amplify(ab, audioLevels); } + // インポイントよりも手前とアウトポイント以降はゼロクリアする + Time time = _arContext.getTime(); + Time sampleDuration = _arContext.getAudioMode().sampleDuration; + + int clearFrameCount = (int) getInPoint().subtract(time).toFrameNumber(sampleDuration); + if (clearFrameCount > 0) { + _arSupport.clear(ab, 0, clearFrameCount); + } + + int clearFrameOffset = (int) getOutPoint().subtract(time).toFrameNumber(sampleDuration); + clearFrameCount = _arContext.getFrameCount() - clearFrameOffset; + if (clearFrameCount > 0) { + _arSupport.clear(ab, clearFrameOffset, clearFrameCount); + } + return ab; } diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/JavaSoundInput.java javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/JavaSoundInput.java --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/JavaSoundInput.java 2010-01-29 18:32:43.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/JavaSoundInput.java 2010-02-06 17:41:45.000000000 +0900 @@ -168,11 +168,23 @@ AudioBuffer ab = _arSupport.createAudioBuffer(); AudioMode audioMode = ab.getAudioMode(); Object data = ab.getData(); + int dataOffset = 0; int dataLength = ab.getDataLength(); int lengthInBytes = ab.getDataLengthInBytes(); - // TODO ストリームの末尾を超えてスキップしようとすると例外発生する? - _stream.skip(audioMode.frameSize * (frameNumber - _position)); + if (frameNumber >= 0) { + // TODO ストリームの末尾を超えてスキップしようとすると例外発生する? + _stream.skip(audioMode.frameSize * (frameNumber - _position)); + + } else if (_position == 0) { + _arSupport.clear(ab, 0, (int)-frameNumber); + dataOffset = (int)-frameNumber * audioMode.channels; + dataLength -= dataOffset; + lengthInBytes -= dataOffset * audioMode.sampleSize; + + } else { + throw new IllegalStateException(); + } if (_buffer == null || _buffer.length < lengthInBytes) { _buffer = new byte[lengthInBytes]; @@ -183,14 +195,14 @@ switch (audioMode.dataType) { case SHORT: ByteBuffer.wrap(_buffer, 0, lengthInBytes).order(ByteOrder.nativeOrder()) - .asShortBuffer().get((short[]) data, 0, dataLength); + .asShortBuffer().get((short[]) data, dataOffset, dataLength); break; case INT: ByteBuffer.wrap(_buffer, 0, lengthInBytes).order(ByteOrder.nativeOrder()) - .asIntBuffer().get((int[]) data, 0, dataLength); + .asIntBuffer().get((int[]) data, dataOffset, dataLength); break; case FLOAT: - for (int i = 0; i < dataLength; ++i) { + for (int i = dataOffset; i < dataLength; ++i) { int value = (_buffer[i*4 ] & 0xff) | ((_buffer[i*4+1] & 0xff) << 8) | ((_buffer[i*4+2] & 0xff) << 16) diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/LayerCompositionImpl.java javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/LayerCompositionImpl.java --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/LayerCompositionImpl.java 2010-01-21 09:56:12.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/LayerCompositionImpl.java 2010-02-06 16:23:54.000000000 +0900 @@ -290,13 +290,15 @@ public AudioBuffer renderAudioChunk() { AudioBuffer ab = null; Time time = _arContext.getTime(); + Time chunkDuration = Time.fromFrameNumber( + _arContext.getFrameCount(), _arContext.getAudioMode().sampleDuration); for (Layer layer : _layers) { if (!LayerNature.isAudioEnabled(layer)) { continue; } - if (layer.getInPoint().after(time) || !layer.getOutPoint().after(time)) { + if (layer.getInPoint().after(time.add(chunkDuration)) || !layer.getOutPoint().after(time)) { continue; } diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/MacOSXQTCoreVideoInput.java javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/MacOSXQTCoreVideoInput.java --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/MacOSXQTCoreVideoInput.java 2010-01-27 09:35:58.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/MacOSXQTCoreVideoInput.java 2010-02-06 18:00:11.000000000 +0900 @@ -266,12 +266,25 @@ return null; } - final Time time = _arContext.getTime(); final AudioBuffer ab = _arSupport.createAudioBuffer(); + final AudioMode am = ab.getAudioMode(); + + Time time = _arContext.getTime(); + final long timeValue; + final int offset; + if (time.timeValue >= 0) { + timeValue = time.timeValue; + offset = 0; + } else { + timeValue = 0; + offset = (int) new Time(-time.timeValue, time.timeScale).toFrameNumber(am.sampleDuration); + _arSupport.clear(ab, 0, offset); + } + + final int timeScale = time.timeScale; int error = _audioThread.invoke(new Task() { public Integer run() throws Exception { - AudioMode am = ab.getAudioMode(); if (am != _audioMode) { int error = setAudioDescription( _audioInput, am.channels, am.sampleRate, am.sampleSize, @@ -284,7 +297,7 @@ } int error = audioChunkFromTime( - _audioInput, time.timeValue, time.timeScale, ab.getData(), ab.getFrameCount()); + _audioInput, timeValue, timeScale, ab.getData(), offset, ab.getFrameCount() - offset); if (error != 0) { _logger.error("audioChunkFromTime: error " + error); } @@ -318,6 +331,6 @@ long audioInput, int channels, int sampleRate, int sampleSize, boolean floatingPoint); private native int audioChunkFromTime( - long audioInput, long timeValue, int timeScale, Object buffer, int frameCount); + long audioInput, long timeValue, int timeScale, Object buffer, int offset, int frameCount); } diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/WindowsDirectShowInput.java javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/WindowsDirectShowInput.java --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/WindowsDirectShowInput.java 2010-01-27 09:41:27.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/WindowsDirectShowInput.java 2010-02-06 19:39:19.000000000 +0900 @@ -229,13 +229,23 @@ return null; } - Time time = _arContext.getTime(); - final long dsTime = time.timeValue * 10000000 / time.timeScale; final AudioBuffer ab = _arSupport.createAudioBuffer(); + final AudioMode am = ab.getAudioMode(); + + Time time = _arContext.getTime(); + final long dsTime; + final int offset; + if (time.timeValue >= 0) { + dsTime = time.timeValue * 10000000 / time.timeScale; + offset = 0; + } else { + dsTime = 0; + offset = (int) new Time(-time.timeValue, time.timeScale).toFrameNumber(am.sampleDuration); + _arSupport.clear(ab, 0, offset); + } int error = _audioThread.invoke(new Task() { public Integer run() throws Exception { - AudioMode am = ab.getAudioMode(); if (am != _audioMode) { // TODO オーディオフォーマットの設定 //int error = setAudioDescription( @@ -248,7 +258,9 @@ //_audioMode = am; } - int error = audioChunkFromTime(_audioInput, dsTime, ab.getData(), ab.getDataLengthInBytes()); + int offsetInBytes = offset * am.frameSize; + int error = audioChunkFromTime(_audioInput, dsTime, ab.getData(), + offsetInBytes, ab.getDataLengthInBytes() - offsetInBytes); if (error != 0) { _logger.error("audioChunkFromTime: error " + error); } @@ -279,6 +291,6 @@ long videoInput, long dsTime, byte[] buffer); private native int audioChunkFromTime( - long audioInput, long dsTime, Object buffer, int chunkSize); + long audioInput, long dsTime, Object buffer, int offset, int size); } diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/services/AudioRenderSupportImpl.java javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/services/AudioRenderSupportImpl.java --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/services/AudioRenderSupportImpl.java 2009-12-21 21:43:29.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/internal/services/AudioRenderSupportImpl.java 2010-02-06 16:19:40.000000000 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Yoshikazu Kuramochi + * Copyright (c) 2009,2010 Yoshikazu Kuramochi * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -23,6 +23,8 @@ package ch.kuramo.javie.core.internal.services; +import java.util.Arrays; + import ch.kuramo.javie.api.Vec2d; import ch.kuramo.javie.core.AudioBuffer; import ch.kuramo.javie.core.internal.AudioBufferImpl; @@ -160,4 +162,27 @@ } } + public void clear(AudioBuffer ab, int frameOffset, int frameCount) { + Object data = ab.getData(); + int channels = ab.getAudioMode().channels; + + switch (ab.getAudioMode().dataType) { + case SHORT: + Arrays.fill((short[])data, frameOffset*channels, (frameOffset+frameCount)*channels, (short)0); + break; + + case INT: + Arrays.fill((int[])data, frameOffset*channels, (frameOffset+frameCount)*channels, 0); + break; + + case FLOAT: + Arrays.fill((float[])data, frameOffset*channels, (frameOffset+frameCount)*channels, 0); + break; + + default: + throw new IllegalArgumentException( + "unsupported AudioMode.DataType: " + ab.getAudioMode().dataType); + } + } + } diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/services/AudioRenderSupport.java javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/services/AudioRenderSupport.java --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/services/AudioRenderSupport.java 2009-12-21 21:43:29.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/java/ch/kuramo/javie/core/services/AudioRenderSupport.java 2010-02-06 16:19:40.000000000 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Yoshikazu Kuramochi + * Copyright (c) 2009,2010 Yoshikazu Kuramochi * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -37,4 +37,6 @@ void amplify(AudioBuffer ab, Vec2d amplitude); + void clear(AudioBuffer ab, int frameOffset, int frameCount); + } diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInput.h javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInput.h --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInput.h 2009-12-29 18:53:11.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInput.h 2010-02-06 16:11:40.000000000 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Yoshikazu Kuramochi + * Copyright (c) 2009,2010 Yoshikazu Kuramochi * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -83,6 +83,7 @@ -(OSStatus) audioChunkFromTime:(QTTime)time buffer:(void*)buffer + offset:(long)offset frameCount:(long)frameCount; @end diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInput.m javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInput.m --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInput.m 2010-01-12 07:54:50.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInput.m 2010-02-06 16:11:40.000000000 +0900 @@ -509,6 +509,7 @@ -(OSStatus) audioChunkFromTime:(QTTime)time buffer:(void*)buffer + offset:(long)offset frameCount:(long)frameCount { if (mAudioExtraction == NULL) { @@ -531,11 +532,13 @@ return error; } + char* p = (char*)buffer + mASBD.mBytesPerFrame * offset; + AudioBufferList bufList; bufList.mNumberBuffers = 1; bufList.mBuffers[0].mNumberChannels = mASBD.mChannelsPerFrame; bufList.mBuffers[0].mDataByteSize = mASBD.mBytesPerFrame * frameCount; - bufList.mBuffers[0].mData = buffer; + bufList.mBuffers[0].mData = p; UInt32 flags; UInt32 filledFrames = frameCount; @@ -549,7 +552,7 @@ if (filledFrames < frameCount) { UInt32 filledBytes = filledFrames * mASBD.mBytesPerFrame; UInt32 restBytes = (frameCount - filledFrames) * mASBD.mBytesPerFrame; - memset((char*)buffer + filledBytes, 0, restBytes); + memset(p + filledBytes, 0, restBytes); } return noErr; diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInputJNI.h javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInputJNI.h --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInputJNI.h 2009-07-10 11:25:38.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInputJNI.h 2010-02-06 15:55:31.000000000 +0900 @@ -58,10 +58,10 @@ /* * Class: ch_kuramo_javie_core_internal_MacOSXQTCoreVideoInput * Method: audioChunkFromTime - * Signature: (JJILjava/lang/Object;I)I + * Signature: (JJILjava/lang/Object;II)I */ JNIEXPORT jint JNICALL Java_ch_kuramo_javie_core_internal_MacOSXQTCoreVideoInput_audioChunkFromTime - (JNIEnv *, jobject, jlong, jlong, jint, jobject, jint); + (JNIEnv *, jobject, jlong, jlong, jint, jobject, jint, jint); #ifdef __cplusplus } diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInputJNI.m javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInputJNI.m --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInputJNI.m 2010-01-27 09:25:01.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/macosx/QTCoreVideoInput/QTCoreVideoInputJNI.m 2010-02-06 16:11:40.000000000 +0900 @@ -148,7 +148,7 @@ JNIEXPORT jint JNICALL Java_ch_kuramo_javie_core_internal_MacOSXQTCoreVideoInput_audioChunkFromTime (JNIEnv* env, jobject jthis, jlong audioInputAddress, - jlong timeValue, jint timeScale, jobject byteArray, jint frameCount) + jlong timeValue, jint timeScale, jobject byteArray, jint offset, jint frameCount) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -156,7 +156,7 @@ AudioInput* audioInput = POINTER(AudioInput*, audioInputAddress); jint error = [audioInput audioChunkFromTime:QTMakeTime(timeValue, timeScale) - buffer:buffer frameCount:frameCount]; + buffer:buffer offset:offset frameCount:frameCount]; (*env)->ReleasePrimitiveArrayCritical(env, byteArray, buffer, 0); diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/windows/DirectShowInput/DirectShowInput/DirectShowInputJNI.cpp javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/windows/DirectShowInput/DirectShowInput/DirectShowInputJNI.cpp --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/windows/DirectShowInput/DirectShowInput/DirectShowInputJNI.cpp 2009-12-29 19:09:38.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/windows/DirectShowInput/DirectShowInput/DirectShowInputJNI.cpp 2010-02-06 19:35:15.000000000 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Yoshikazu Kuramochi + * Copyright (c) 2009,2010 Yoshikazu Kuramochi * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -177,12 +177,12 @@ JNIEXPORT jint JNICALL Java_ch_kuramo_javie_core_internal_WindowsDirectShowInput_audioChunkFromTime (JNIEnv* env, jobject jthis, jlong audioInputAddress, - jlong dsTime, jobject byteArrayObj, jint chunkSize) + jlong dsTime, jobject byteArrayObj, jint offset, jint size) { AudioInput* audioInput = reinterpret_cast(audioInputAddress); HRESULT hr = audioInput->FillBuffer( - dsTime, PrimitiveArrayCritical(env, (jarray)byteArrayObj), chunkSize); + dsTime, (char*)(void*)PrimitiveArrayCritical(env, (jarray)byteArrayObj) + offset, size); return hr; } diff -ruN javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/windows/DirectShowInput/DirectShowInput/DirectShowInputJNI.h javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/windows/DirectShowInput/DirectShowInput/DirectShowInputJNI.h --- javie-0.3.1-src/ch.kuramo.javie.core/src/main/native/windows/DirectShowInput/DirectShowInput/DirectShowInputJNI.h 2009-07-10 21:50:01.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.core/src/main/native/windows/DirectShowInput/DirectShowInput/DirectShowInputJNI.h 2010-02-06 19:35:15.000000000 +0900 @@ -50,10 +50,10 @@ /* * Class: ch_kuramo_javie_core_internal_WindowsDirectShowInput * Method: audioChunkFromTime - * Signature: (JJLjava/lang/Object;I)I + * Signature: (JJLjava/lang/Object;II)I */ JNIEXPORT jint JNICALL Java_ch_kuramo_javie_core_internal_WindowsDirectShowInput_audioChunkFromTime - (JNIEnv *, jobject, jlong, jlong, jobject, jint); + (JNIEnv *, jobject, jlong, jlong, jobject, jint, jint); #ifdef __cplusplus } diff -ruN javie-0.3.1-src/ch.kuramo.javie.effects/META-INF/MANIFEST.MF javie-0.3.2-src/ch.kuramo.javie.effects/META-INF/MANIFEST.MF --- javie-0.3.1-src/ch.kuramo.javie.effects/META-INF/MANIFEST.MF 2010-01-06 09:46:16.000000000 +0900 +++ javie-0.3.2-src/ch.kuramo.javie.effects/META-INF/MANIFEST.MF 2010-02-06 19:53:15.000000000 +0900 @@ -2,8 +2,8 @@ Bundle-ManifestVersion: 2 Bundle-Name: Javie Effects Bundle-SymbolicName: ch.kuramo.javie.effects;singleton:=true -Bundle-Version: 0.3.1.qualifier +Bundle-Version: 0.3.2.qualifier Bundle-Vendor: rakusan Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: ch.kuramo.javie.api;bundle-version="0.3.1" +Require-Bundle: ch.kuramo.javie.api;bundle-version="0.3.2" Eclipse-BuddyPolicy: global