Class: Lumino::Sound

Inherits:
RefObject
  • Object
show all
Defined in:
LuminoRubyDoc.rb

Overview

音声データひとつ分を表し、再生などの操作を行うクラスです。

Instance Method Summary (collapse)

Constructor Details

- (Lumino::Sound) initialize(filePath) - (Lumino::Sound) initialize(data, dataSize)

ファイルからサウンドオブジェクトを作成します。

Overloads:

  • - (Lumino::Sound) initialize(filePath)

    ファイルからサウンドオブジェクトを作成します。

    Parameters:

    • filePath (String)

      音声ファイルのパス

  • - (Lumino::Sound) initialize(data, dataSize)

    メモリ上の音声ファイルデータからサウンドオブジェクトを作成します。

    Parameters:

    • data (String)

      メモリ上の音声データ

    • dataSize (Integer)

      データサイズ (バイト単位)



1574
1575
# File 'LuminoRubyDoc.rb', line 1574

def initialize
end

Instance Method Details

- (Object) emitter_max_distance=(distance)

サウンドの 3D 音源の減衰距離 (聴こえなくなる距離) を設定します。(default:100)

Parameters:

  • distance (Float)

    距離



1671
1672
# File 'LuminoRubyDoc.rb', line 1671

def emitter_max_distance=
end

- (Object) emitter_position=(position) - (Object) emitter_position=(x, y, z)

サウンドの 3D 音源としての位置を設定します。

Overloads:

  • - (Object) emitter_position=(position)

    サウンドの 3D 音源としての位置を設定します。

    Parameters:

  • - (Object) emitter_position=(x, y, z)

    サウンドの 3D 音源としての位置を設定します。

    Parameters:

    • x (Float)

      3D 空間上の X 座標

    • y (Float)

      3D 空間上の Y 座標

    • z (Float)

      3D 空間上の Z 座標



1655
1656
# File 'LuminoRubyDoc.rb', line 1655

def emitter_position=
end

- (Object) emitter_velocity=(velocity) - (Object) emitter_velocity=(x, y, z)

サウンドの 3D 音源としての速度を設定します。

Overloads:

  • - (Object) emitter_velocity=(velocity)

    サウンドの 3D 音源としての速度を設定します。

    Parameters:

  • - (Object) emitter_velocity=(x, y, z)

    サウンドの 3D 音源としての速度を設定します。

    Parameters:

    • x (Float)

      速度の X 成分

    • y (Float)

      速度の Y 成分

    • z (Float)

      速度の Z 成分



1666
1667
# File 'LuminoRubyDoc.rb', line 1666

def emitter_velocity=
end

- (Object) fade_volume(targetVolume, time, behavior)

サウンド音量のフェード操作を行います。

Parameters:

  • targetVolume (Float)

    変更先の音量

  • time (Float)

    フェードにかける時間 (秒)

  • behavior (Lumino::SoundFadeBehavior)

    フェード完了後の動作の指定



1702
1703
# File 'LuminoRubyDoc.rb', line 1702

def fade_volume
end

- (Object) is_3d_enabled=(enabled)

サウンドを 3D 音源であるかを設定します。

Parameters:

  • enabled (Bool)

    true = 3D音声 / false = 非3D



1609
1610
# File 'LuminoRubyDoc.rb', line 1609

def is_3d_enabled=
end

- (Bool) is_3d_enabled?

サウンドが 3D 音源であるかを確認します。

Returns:

  • (Bool)

    状態 (true = 3D音声 / false = 非 3D)



1614
1615
# File 'LuminoRubyDoc.rb', line 1614

def is_3d_enabled?
end

- (Object) is_loop_enabled=(loopEnable)

サウンドのループ再生の有無を設定します。

Parameters:

  • loopEnable (Bool)

    true = ループ再生する / false = しない



1599
1600
# File 'LuminoRubyDoc.rb', line 1599

def is_loop_enabled=
end

- (Bool) is_loop_enabled?

サウンドのループ再生が有効であるかを確認します。

Returns:

  • (Bool)

    ループ再生の有無状態を格納する変数



1604
1605
# File 'LuminoRubyDoc.rb', line 1604

def is_loop_enabled?
end

- (Object) pause

サウンドの再生を一時停止します。



1691
1692
# File 'LuminoRubyDoc.rb', line 1691

def pause
end

- (Float) pitch

サウンドのピッチを取得します。

Returns:

  • (Float)

    ピッチを格納する変数



1594
1595
# File 'LuminoRubyDoc.rb', line 1594

def pitch
end

- (Object) pitch=(pitch)

サウンドのピッチを設定します。

Parameters:

  • pitch (Float)

    ピッチ (0.5~2.0)



1589
1590
# File 'LuminoRubyDoc.rb', line 1589

def pitch=
end

- (Object) play

サウンドを再生します。



1683
1684
# File 'LuminoRubyDoc.rb', line 1683

def play
end

- (Integer) played_samples

サウンドの再生したサンプル数を取得します。

Returns:

  • (Integer)

    再生したサンプル数を格納する変数



1634
1635
# File 'LuminoRubyDoc.rb', line 1634

def played_samples
end

- (Lumino::SoundPlayingMode) playing_mode

サウンド再生時の音声データの再生方法を取得します。

Returns:



1624
1625
# File 'LuminoRubyDoc.rb', line 1624

def playing_mode
end

- (Object) playing_mode=(mode)

サウンド再生時の音声データの再生方法を設定します。

Parameters:



1619
1620
# File 'LuminoRubyDoc.rb', line 1619

def playing_mode=
end

- (Lumino::SoundPlayingState) playing_state

サウンドの再生状態を取得します。

Returns:



1629
1630
# File 'LuminoRubyDoc.rb', line 1629

def playing_state
end

- (Object) resume

サウンドの再生を一時停止します。



1695
1696
# File 'LuminoRubyDoc.rb', line 1695

def resume
end

- (Integer) sampling_rate

サウンドのサンプリングレートを取得します。

Returns:

  • (Integer)

    サンプリングレートを格納する変数



1644
1645
# File 'LuminoRubyDoc.rb', line 1644

def sampling_rate
end

- (Object) set_loop_range

サウンドのループ再生の範囲を設定します。

 

begin と length に 0 を指定すると、全体をループ領域として設定します。

Parameters:

  • begin (Integer)

    ループ領域の先頭位置 (サンプル数単位)

  • length (Integer)

    ループ領域長さ (サンプル数単位)



1679
1680
# File 'LuminoRubyDoc.rb', line 1679

def set_loop_range
end

- (Object) stop

サウンドの再生を停止します。



1687
1688
# File 'LuminoRubyDoc.rb', line 1687

def stop
end

- (Integer) total_samples

サウンドの音声データ全体のサンプル数を取得します。

Returns:

  • (Integer)

    音声データ全体のサンプル数を格納する変数



1639
1640
# File 'LuminoRubyDoc.rb', line 1639

def total_samples
end

- (Float) volume

サウンドのボリュームを取得します。

Returns:

  • (Float)

    ボリュームを格納する変数



1584
1585
# File 'LuminoRubyDoc.rb', line 1584

def volume
end

- (Object) volume=(volume)

サウンドのボリュームを設定します。

Parameters:

  • volume (Float)

    ボリューム (0.0~1.0)



1579
1580
# File 'LuminoRubyDoc.rb', line 1579

def volume=
end