本文整理汇总了Java中com.jcraft.jorbis.Block类的典型用法代码示例。如果您正苦于以下问题:Java Block类的具体用法?Java Block怎么用?Java Block使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Block类属于com.jcraft.jorbis包,在下文中一共展示了Block类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initJOrbis
import com.jcraft.jorbis.Block; //导入依赖的package包/类
private void initJOrbis() {
oy = new SyncState();
os = new StreamState();
og = new Page();
op = new Packet();
vi = new Info();
vc = new Comment();
vd = new DspState();
vb = new Block(vd);
buffer = null;
bytes = 0;
oy.init();
}
示例2: init_jorbis
import com.jcraft.jorbis.Block; //导入依赖的package包/类
/**
* Initializes all the jOrbis and jOgg vars that are used for song playback.
*/
private void init_jorbis()
{
oggSyncState_ = new SyncState();
oggStreamState_ = new StreamState();
oggPage_ = new Page();
oggPacket_ = new Packet();
vorbisInfo = new Info();
vorbisComment = new Comment();
vorbisDspState = new DspState();
vorbisBlock = new Block(vorbisDspState);
buffer = null;
bytes = 0;
currentBytes = 0L;
oggSyncState_.init();
}
示例3: initJOrbis
import com.jcraft.jorbis.Block; //导入依赖的package包/类
private void initJOrbis() {
oy = new SyncState();
os = new StreamState();
og = new Page();
op = new Packet();
vi = new Info();
vc = new Comment();
vd = new DspState();
vb = new Block(vd);
buffer = null;
bytes = 0;
oy.init();
}
示例4: initJOrbis
import com.jcraft.jorbis.Block; //导入依赖的package包/类
private void initJOrbis(){
oy=new SyncState();
os=new StreamState();
og=new Page();
op=new Packet();
vi=new Info();
vc=new Comment();
vd=new DspState();
vb=new Block(vd);
buffer=null;
bytes=0;
oy.init();
}
示例5: ADecoder
import com.jcraft.jorbis.Block; //导入依赖的package包/类
public ADecoder(){
info = new Info();
info.init();
comment = new Comment();
comment.init();
dsp = new DspState();
block = new Block(dsp);
}
示例6: initializeJOrbis
import com.jcraft.jorbis.Block; //导入依赖的package包/类
/**
* Initializes OGG player
*/
private void initializeJOrbis() {
joggPacket = new Packet();
joggPage = new Page();
joggStreamState = new StreamState();
joggSyncState = new SyncState();
jorbisDspState = new DspState();
jorbisBlock = new Block(jorbisDspState);
jorbisComment = new Comment();
jorbisInfo = new Info();
joggSyncState.init();
}
示例7: initJOrbis
import com.jcraft.jorbis.Block; //导入依赖的package包/类
/**
* Initialize JOrbis.
*/
void initJOrbis() {
oy = new SyncState();
os = new StreamState();
og = new Page();
op = new Packet();
vi = new Info();
vc = new Comment();
vd = new DspState();
vb = new Block(vd);
oy.init();
}
示例8: initializeJOrbis
import com.jcraft.jorbis.Block; //导入依赖的package包/类
/**
* Initializes JOrbis.
*/
private void initializeJOrbis()
{
joggPacket = new Packet();
joggPage = new Page();
joggStreamState = new StreamState();
joggSyncState = new SyncState();
jorbisDspState = new DspState();
jorbisBlock = new Block(jorbisDspState);
jorbisComment = new Comment();
jorbisInfo = new Info();
// Initialize SyncState
joggSyncState.init();
}
示例9: init_jorbis
import com.jcraft.jorbis.Block; //导入依赖的package包/类
/**
* Initializes all the jOrbis and jOgg vars that are used for song playback.
*/
private void init_jorbis()
{
oggSyncState_ = new SyncState();
oggStreamState_ = new StreamState();
oggPage_ = new Page();
oggPacket_ = new Packet();
vorbisInfo = new Info();
vorbisComment = new Comment();
vorbisDspState = new DspState();
vorbisBlock = new Block(vorbisDspState);
buffer = null;
bytes = 0;
oggSyncState_.init();
}
示例10: init
import com.jcraft.jorbis.Block; //导入依赖的package包/类
/**
* Initialize states.
*/
private void init() {
ogg_sync_state = new SyncState();
ogg_stream_state = new StreamState();
ogg_page = new Page();
ogg_packet = new Packet();
vorbis_info = new Info();
vorbis_comment = new Comment();
vorbis_dsp_state = new DspState();
vorbis_block = new Block(vorbis_dsp_state);
ogg_sync_state.init();
}
示例11: init_jorbis
import com.jcraft.jorbis.Block; //导入依赖的package包/类
/**
* Initializes all the jOrbis and jOgg vars that are used for song playback.
*/
private void init_jorbis()
{
m_oggSyncState = new SyncState();
m_oggStreamState = new StreamState();
m_oggPage = new Page();
m_oggPacket = new Packet();
m_vorbisInfo = new Info();
m_vorbisComment = new Comment();
m_vorbisDspState = new DspState();
m_vorbisBlock = new Block(m_vorbisDspState);
m_oggSyncState.init();
}
示例12: UpdateVelocities
import com.jcraft.jorbis.Block; //导入依赖的package包/类
public void UpdateVelocities()
{
Iterator j;
for (Iterator i = getWorlds().iterator(); i.hasNext();
j.hasNext())
{
World world = (World)i.next();
j = world.getEntities().iterator(); continue;
Entity e = (Entity)j.next();
Vector newv = e.getVelocity().clone();
UUID uuid = e.getUniqueId();
if ((this.velocities.containsKey(uuid)) && (this.onGround.containsKey(uuid)) && (!e.isOnGround()) && (!e.isInsideVehicle())) {
Vector oldv = (Vector)this.velocities.get(uuid);
if (!((Boolean)this.onGround.get(uuid)).booleanValue()) {
Vector d = oldv.clone();
d.subtract(newv);
double dy = d.getY();
if ((dy > 0.0D) && ((newv.getY() < -0.01D) || (newv.getY() > 0.01D))) {
Location loc = e.getLocation().clone();
double gravity = 1.0D;
while (loc.getBlockY() >= 0) {
Block block = loc.getBlock();
if (block.getType() == Material.WOOL) {
if (block.getData() == 5)
gravity = 0.2D;
else if (block.getData() == 14)
gravity = 5.0D;
else if (block.getData() == 9)
gravity = -0.2D;
else if (block.getData() == 2) {
gravity = -5.0D;
}
}
if (block.getType() != Material.AIR) {
break;
}
loc.setY(loc.getY() - 1.0D);
}
newv.setY(oldv.getY() - dy * gravity);
boolean newxchanged = (newv.getX() < -0.001D) || (newv.getX() > 0.001D);
boolean oldxchanged = (oldv.getX() < -0.001D) || (oldv.getX() > 0.001D);
if ((newxchanged) && (oldxchanged)) {
newv.setX(oldv.getX());
}
boolean newzchanged = (newv.getZ() < -0.001D) || (newv.getZ() > 0.001D);
boolean oldzchanged = (oldv.getZ() < -0.001D) || (oldv.getZ() > 0.001D);
if ((newzchanged) && (oldzchanged)) {
newv.setZ(oldv.getZ());
}
e.setVelocity(newv.clone());
}
}
else if (((e instanceof Player)) &&
(this.positions.containsKey(uuid))) {
Vector pos = e.getLocation().toVector();
Vector oldpos = ((Location)this.positions.get(uuid)).toVector();
Vector velocity = pos.subtract(oldpos);
newv.setX(velocity.getX());
newv.setZ(velocity.getZ());
}
e.setVelocity(newv.clone());
}
this.velocities.put(uuid, newv.clone());
this.onGround.put(uuid, Boolean.valueOf(e.isOnGround()));
this.positions.put(uuid, e.getLocation());
}
}