[AS3.0]SoundChannel.position≠Sound.length
別の掲示板の引用で恐縮ですが、まさにこの問題に直面しています。
http://www.flash-jp.com/modules/newbb/viewtopic.php?topic_id=7819&forum=8&post_id=38874#f orumpost38874
上記サイトで書かれていますが、
「 Firefox 2.0.0.14 & Internet Explorer 7.0/Windows Vistaで確認したところ、SoundChannel.positionプロパティの値がSound.lengthの値に達しないという問題が生じました。」
の問題に対する、解決策、回避策などはございませんでしょうか。
AS3.0+Vistaの環境では、mp3の再生に合わせてバーを伸縮させるスライダーようなものは作れない、なんてことはないと思うのですが・・・
再生終了時のpositionの値がlengthの値と同じにならなくても、その終了した時の値が、再生前に分かれば問題ないのだと思うのですが、そのようなことは無理でしょうか。
その他、何か情報がありましたら、ぜひよろしくお願いいたします。
Thanks Andrei.
But I really dont understand. You see, I am not too good (actually pretty bad) with Ationscript 3.
Att.,
Edwin
I managed to get it to move each second though with this:
var myTimer:Timer = new Timer(1000);
myTimer.addEventListener(TimerEvent.TIMER, runTimer);
myTimer.start();
function runTimer(event:TimerEvent):void {
trace("Hello");
progreso.value = progreso.value+1;
Similar Messages
-
Why isn't the end position of a sound channel the same as the length of a sound?
public function play():void
soundChannel = sound.play();
soundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete);
private function onSoundComplete(e:Event):void
var endPosition:Number = soundChannel.position;
var length:Number = sound.length;
If you test the previous code you will see that the position of the soundChannel when SOUND_COMPLETE is dispatched is different then the length of the sound.
Why isn't the soundChannel play all the sound? Why does it stops earlier? and how can I find the end position of the soundChannel without playing and listening to the SOUND_COMPLETE event?imnikey,
I see no one has answered your question. I don't have an answer either, but I'm experiencing similar problems with the SoundChannel position. The problem with tracking the sound object's position through its sound channel gets worse when there is more than one Flash movieclip open in a different browser window. Opening a Flash audio player seems to work fine if it is the only Flash movieclip open on my desktop. After I open another Flash object in a separate window, the audio player fails to properly track the SoundChannel position, and fails to correctly fire the SoundComplete event.
Anyone else experiencing these problems? Has anyone been able to find a reliable method for tracking the sound channel position with more than one Flash movieclip open on the desktop? Is this a known issue or bug with the Sound API for Flash Player 10? We could really use some answers.
jazzsurfer -
SoundChannel.position won't reset
I'm trying to play an audio that goes along with the text on the screen. As the audio plays, a timer event handler checks the SoundChannel.position to see determine what text should be highlighted. In my application I have a few audios that play in succession. When one ends, the SoudComplete event is fired and I start playing the next audio. I create a new sound object and reset the timer, but for some reason, the SoundChannel.Postion is off. Here is my code:
private function soundComplete(evt:Event):void
//unHighlightSegment(this.curSegment_int);
//timer.removeEventListener(TimerEvent.TIMER, highlightNext);
//timer.stop();
oSoundChannel.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
/*oSoundChannel = null;
oSound = null;*/
//timer.reset();
if(this.toggleFull_bl && (curSegment_int+1 < this.dialogueText_ary.length))
if(this.normal)
playAllNormal(curSegment_int+1);
else
playAllSlow(curSegment_int+1);
return;
dialoguePlaying = false;
firstPlay = true;
isPaused = false;
stopPlaying();
playDialogue_btn.gotoAndStop("playUp");
//plays the entire audio
private function playAllNormal(seg:uint):void
//trace(audiosToPlay_ary[curDialogue_uint] + "_nml.mp3");
//soundEnd = true;
timer.stop();
timer.reset();
timer.removeEventListener(TimerEvent.TIMER, stopVocalPlayback);
timer.removeEventListener(TimerEvent.TIMER, highlightNext);
trace("playAllNormal", seg);
try
trace("stop audio");
oSoundChannel.stop();
catch(e:Error)
trace("Sound Channel object not yet created");
var temp:int = dialogInfo.Segment[seg].Dialog;
trace(String("CurrentDialog"), temp);
oSound = new Sound(new URLRequest(audiosToPlay_ary[temp] + "_nml.mp3")); //Create a new sound
oSoundChannel = oSound.play(uint(audioTimes[temp].Time[dialogInfo.Segment[seg].Seg])); //Play the sound and assign this to oSoundChannel
trace(audiosToPlay_ary[temp] + "_nml.mp3", audioTimes[temp].Time[dialogInfo.Segment[seg].Seg]);
oSoundChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
oSoundTransform.volume = volumeLevel;
oSoundChannel.soundTransform = oSoundTransform;
trace("Sound position just after play", oSoundChannel.position); //oSoundChannel.position should be close to zero here.
timer.addEventListener(TimerEvent.TIMER, highlightNext); //add the timer event to check the soundchannel position
timer.start();
private function highlightNext(evt:TimerEvent):void
var len:uint;
len = this.dialogueText_ary.length;
if(normal)
if(curSegment_int+1 < len)
if(oSoundChannel.position >= uint(audioTimes[dialogInfo.Segment[curSegment_int].Dialog].Time[dialogInfo.Segment[curSeg ment_int].Seg]) && oSoundChannel.position < uint(audioTimes[dialogInfo.Segment[curSegment_int].Dialog].Time[dialogInfo.Segment[curSeg ment_int].Seg+1]))
highlightSegment(curSegment_int);
var a:int = 1;
else //if the position is not within range, highlight the next segment and increment the curSement counter
unHighlightSegment(curSegment_int);
curSegment_int++;
trace("highlightNext", curSegment_int, oSoundChannel.position);
else if(curSegment_int+1 == len)
highlightSegment(curSegment_int);
else
if(curSegment_int+1 < len)
if(oSoundChannel.position >= uint(audioTimes[dialogInfo.Segment[curSegment_int].Dialog].TimeSlw[dialogInfo.Segment[cur Segment_int].Seg]) && oSoundChannel.position < uint(audioTimes[dialogInfo.Segment[curSegment_int].Dialog].TimeSlw[dialogInfo.Segment[cur Segment_int].Seg+1]))
highlightSegment(curSegment_int);
else
unHighlightSegment(curSegment_int);
curSegment_int++;
else if(curSegment_int+1 == len)
highlightSegment(curSegment_int);
here's the output I get:
JAN_2000_Claudia1_TYE_Cesar_1.1_nml.mp3 42440
Sound position just after play 42440
highlightNext 16 45458.59410430839
highlightNext 17 47687.70975056689
highlightNext 18 47780.589569161
highlightNext 19 47873.4693877551
highlightNext 20 47919.90929705215
highlightNext 21 48059.229024943306
highlightNext 22 48152.10884353741
highlightNext 23 48244.988662131516
highlightNext 24 48337.86848072562
highlightNext 25 48430.748299319726
highlightNext 26 48523.62811791383
highlightNext 27 48570.06802721088
highlightNext 28 48662.947845804985
highlightNext 29 48802.26757369615
highlightNext 30 48895.14739229025
highlightNext 31 48941.5873015873
playAllNormal 32
stop audio
CurrentDialog 1
JAN_2000_Claudia1_TYE_Cesar_1.2_nml.mp3 35015 -- This is where things go wrong
Sound position just after play 35014.988662131516 --sound position should be zero here. Because it's not zero, the position is out of range
highlightNext 32 35061.42857142857 --and the curSegment counter is incremented and the highlighted segment skips ahead too
highlightNext 33 36315.30612244898 --far
highlightNext 34 38962.380952380954
highlightNext 35 39055.26077097505
highlightNext 36 39101.70068027211
highlightNext 37 39194.58049886621
highlightNext 38 39241.02040816326
highlightNext 39 39380.34013605442
highlightNext 40 39426.78004535147
highlightNext 41 39519.65986394558
highlightNext 42 39566.099773242626
highlightNext 43 39705.41950113379
highlightNext 44 39798.29931972789
highlightNext 45 39844.73922902494
playAllNormal 46
stop audio
CurrentDialog 2
JAN_2000_Claudia1_TYE_Cesar_1.3_nml.mp3 28812
Sound position just after play 28811.995464852607 --again here the position should be 0
highlightNext 46 28858.43537414966
Any ideas on why the position is not close to zero just after I begin playing?Somewhere between the sound ending and the firing of the soundComplete event, the timer still keeps counting and firing the timer event. Any suggestions on how to stop the timer? I already call Timer.stop() and Timer.RemoveEventListener when the sound complete fires, but the timer still has time to fire several times before I can stop it in the SoundComplete event handler.
-
SoundChannel.position inaccuracies within SampleDataEvent.SAMPLE_DATA
The application generates sound dynamically by handling SampleDataEvent. It needs to determine exactly what part of the sound was actually playing when a click was made.
Unfortunately, the latency calculation is slightly off because SoundChannel.position seems to be returning values that are +- 20 milliseconds off. The attached class demonstrates the issue by using a timer to occasionally check the position against the current time, displaying the difference between the two, along with the range of differences over time. The timer fires as often as it can so different ranges can be seen by using different movie frame rates.
I'm not sure why this is, but I'm guessing it's something to do with the fact that the sound buffering is happening in a separate thread. Perhaps this thread only periodically updates the main thread about its position?
Is there any more accurate way to calculate latency? Or maybe some way to know just how much the position value with be off at any given time?The application generates sound dynamically by handling SampleDataEvent. It needs to determine exactly what part of the sound was actually playing when a click was made.
Unfortunately, the latency calculation is slightly off because SoundChannel.position seems to be returning values that are +- 20 milliseconds off. The attached class demonstrates the issue by using a timer to occasionally check the position against the current time, displaying the difference between the two, along with the range of differences over time. The timer fires as often as it can so different ranges can be seen by using different movie frame rates.
I'm not sure why this is, but I'm guessing it's something to do with the fact that the sound buffering is happening in a separate thread. Perhaps this thread only periodically updates the main thread about its position?
Is there any more accurate way to calculate latency? Or maybe some way to know just how much the position value with be off at any given time? -
Hi
Basically im working out the progress of a sound.
this.soundChanel.position) / this.soundObj.length
But i want the sound length to come from xml. So my sound length from xml is 1.33. to calculate the milliseconds from my xml length im doing 1.33 * 60000.
1.33 * 60000 = 79800
but the sound.length = 93361.63265306123
So what am i doing wrong. the sound.length is in milliseconds, and I thought I was turning my 1.33 to milliseconds.1 min 33 seconds - you need to break apart the minutes and seconds.
1 min = 60,000 ms
33 sec = 33,000 ms
93,000 ms.
If you want to do it just by seconds - then you'd still break apart, multiply the min by 60, add seconds and multiply by 1000:
((1 X 60) + 33) * 1000 = 93,000 -
How to check position and length of a field in a structure
Dear All,
DATA : P_DEST TYPE ANY.
Assuming that the structure (P_DEST ) conatins a field called 'ROUTE', how to find the position and length of field 'ROUTE'.
Please help!!
Thank you in advance.
Sravan.Hi,
you may need to find out the type of a generic interface parameter in a subroutine. To do this, you would use the statement:
DESCRIBE FIELD <f> [LENGTH <l>] [TYPE <t> [COMPONENTS <n>]]
[OUTPUT-LENGTH <o>] [DECIMALS <d>]
[EDIT MASK <m>] [HELP-ID <h>].
The attributes of the data object <f> specified by the parameters of the statement are written to the variables following the parameters.
Regards
Sudheer -
X-FI 3D positional sound through headphones with CMSS
<FONT color=#ff0000 size=4>UPDATE: To Creative employees
<FONT color=#ff0000 size=4>Please respond to this thread and try to sort this issue. Is bad sound from "headphones"+CMSS On due to a limitation of the hardware (is the sound quality degradation compared to "2/2. speakers"+CMSS On due to a much more complex algorithm of 3D positional sound mixing)?
<FONT color=#ff0000 size=4>Is there a way to adjust the speaker angles in Calibration tab of THX Console to more than 60 degrees (I would definitely consider a hexediting hack as a viable solution, whatever works)?
I have this problem with X-FI Fatalty. Maybe someone knows what to do about it... I'm trying to get 3D positional sound to work through regular stereo headphones using CMSS 3D. The way I have it set up is as follows:the win xp Control Panel is set to 5., X-FI audio console is set to "headphones" or "2/2. speakers", and CMSS 3D is enabled at default settings. It does work - the 5. sounds from, say, a game is downmixed to stereo with 3D positional effects mixed in (sounds coming from behind are of a different tone, and actually sound like they come from behind). There are problems however.With "headphones" setting, the sound quality is atrocious - the sound is muddy and boomy. The 3D positional audio effects work great - I can pinpoint every direction from which the sound is coming fairly accurately. Note that without CMSS 3D, the "headphone" setting sounds great.With "2/2. speakers" setting, the sound quality is normal (sounds great on my HD555 headphones), but the 3D positional audio effects are not good - audio control panel in X-FI software allows only a maximum of 20 degrees setting for the angle between the speakers, whereas 80 degrees would be required to simulate 3D effects through headphones (X-FI software has two settings for that actually, (+/-)60 degrees maximum for each speaker, with the reference angle of zero degrees being directly in front of the listener - directly in between the two speakers).So my questions is this. Has anyone figured out how to either improve the quality of the sound with "headphones" setting, or increase the angles of the speakers to (+/-)90 degrees (80 total) with "2/2. speakers" setting?<!-- / message --><!-- sig --><SPAN>
Message Edited by acrh2 on <SPAN class=date_text>0-3-2006 <SPAN class=time_text>0:45 PM
Message Edited by acrh2 on 0-3-2006 0:46 PMThe only possibility that I can think of is that 2/2. mode is NOT as simple as headphone mode with crosstalk cancelation. Perhaps the HRTF only kicks in for sound sources outside of the arc directly in front of the listener. If that were the case, you wouldn't percei've any distortion for sound sources in front of you.
Also, you are wrong regarding DirectSound3D. Keep in mind that Direct3D and DirectSound3D are not the same. The whole point of OpenAL and DirectSound3D is that they present an API to the programmer through which there is NO specification of the number of speakers. When using OpenAL or DirectSound3D, the only thing a programmer can do is specify the location of a mono sound source in 3D space relati've to the listener. The speaker settings for your DirectSound3D or OpenAL device will then determine how this sound is "rendered" by the soundcard. It is not under control of the game. For example, if you have 5. speakers and the 3D position is behind you, the SOUND CARD will make the decision to use the rear speakers. If you use headphones, the SOUND CARD will decide to apply an HRTF to create the illusion of a rear sound source. The point is that the game does not have control over how many speakers you will get sound from.
However, to further complicate the situation, there are SOME games (HL2 is an example) where DirectSound3D is used, BUT the sound output of the game itself IS a function of the Windows speaker settings. This is not how programmers are SUPPOSED to use DirectSound3D. I've written about this countless times. There is a good post on [H]ard|Forum about this. Do an "advanced" search with my username (thomase) looking for the terms "hl2" and "cmss". -
3D positional sound and movie clips
Hi.
As I said in one of my earlier posts, I'm writing a FPS game in JOGL. So now I need positional sound emittors. I don't quite like Java3D's approach (BTW it's very undocumented, tutorialized??).
Any other suggestions will be appreciated!
And then I also want to diplay an intro/outro movie and cutscenes etc. Which api would you suggest (will always use Windows) to use?
ThanxThe only possibility that I can think of is that 2/2. mode is NOT as simple as headphone mode with crosstalk cancelation. Perhaps the HRTF only kicks in for sound sources outside of the arc directly in front of the listener. If that were the case, you wouldn't percei've any distortion for sound sources in front of you.
Also, you are wrong regarding DirectSound3D. Keep in mind that Direct3D and DirectSound3D are not the same. The whole point of OpenAL and DirectSound3D is that they present an API to the programmer through which there is NO specification of the number of speakers. When using OpenAL or DirectSound3D, the only thing a programmer can do is specify the location of a mono sound source in 3D space relati've to the listener. The speaker settings for your DirectSound3D or OpenAL device will then determine how this sound is "rendered" by the soundcard. It is not under control of the game. For example, if you have 5. speakers and the 3D position is behind you, the SOUND CARD will make the decision to use the rear speakers. If you use headphones, the SOUND CARD will decide to apply an HRTF to create the illusion of a rear sound source. The point is that the game does not have control over how many speakers you will get sound from.
However, to further complicate the situation, there are SOME games (HL2 is an example) where DirectSound3D is used, BUT the sound output of the game itself IS a function of the Windows speaker settings. This is not how programmers are SUPPOSED to use DirectSound3D. I've written about this countless times. There is a good post on [H]ard|Forum about this. Do an "advanced" search with my username (thomase) looking for the terms "hl2" and "cmss". -
Halo 2 - No Positional Sound (Headphon
I have a XTreme Gamer Fatalty Pro card and have a (great) pair of headphones. Since i thought the new games will have better positional audio without needing EAX in Vista, i just got my hands on Halo 2. Played it in Entertainment mode and well the game worked. No positional sound. Then i switched the card to Game mode, enabled 3D cmss and started the game again. And you know what, there was heavy stuttering in the sound, game kept pausing every few seconds. I understand that cmss 3d isnt supported under vista. I?disabled it and just ran it in game mode, Fps were improved a lot, sound quality was better, and well the sound was positional for like 2 speaker system, no 3D audio. Also, EAX effects werent working, some work, like stepping on different surfaces, but the rest didnt, like when i was in the open, all sounds were muffled, maybe because i had headphones. So naturaly, my question would be,?.) Will smss 3D ever come back for vista?2.) Will EAX effects work in vista?3.) Should i return my sound card and wait for a better one by creative?4.) Do i need to return my sound card before creative launches another one and my pricey soundcard is all but worth pennies?5.) Can someone check if they get positional audio with 7. or so because under halo 2 options i can only see headphones and all the way up to 5..6.) Should i ditch my headphones and buy speakers (speakers, not so great on music, loud on my housemates, and another pricey decision)?
chief_x2 wrote:
I have a XTreme Gamer Fatalty Pro card and have a (great) pair of headphones. Since i thought the new games will have better positional audio without needing EAX in Vista, i just got my hands on Halo 2. Played it in Entertainment mode and well the game worked. No positional sound. Then i switched the card to Game mode, enabled 3D cmss and started the game again. And you know what, there was heavy stuttering in the sound, game kept pausing every few seconds. I understand that cmss 3d isnt supported under vista. I disabled it and just ran it in game mode, Fps were improved a lot, sound quality was better, and well the sound was positional for like 2 speaker system, no 3D audio. Also, EAX effects werent working, some work, like stepping on different surfaces, but the rest didnt, like when i was in the open, all sounds were muffled, maybe because i had headphones.So naturaly, my question would be,.) Will smss 3D ever come back for vista?2.) Will EAX effects work in vista?3.) Should i return my sound card and wait for a better one by creative?4.) Do i need to return my sound card before creative launches another one and my pricey soundcard is all but worth pennies?5.) Can someone check if they get positional audio with 7. or so because under halo 2 options i can only see headphones and all the way up to 5..6.) Should i ditch my headphones and buy speakers (speakers, not so great on music, loud on my housemates, and another pricey decision)?
I have the game. No problems here. -
Sound.length is not working for Flex Mobile Project
Hi
i am working on Flash builder 4.6. I see sount.length is returning zero verytime. other sound object is working but sound.length is not working.
Any one facing such type of problem for sound file in Flash builder 4.6.
Thanks
Brij Kishor
Flash Builder App developerThanks for the response. I am using spark TextInput components as you can see in the code above. I've used these conrtols in other apps in FB 4.5 and have had no problems so it seems like something may be different in 4.6, or it's a bug.
-
Sound position and length on Slider Component AS3
Hello:
I have the following working great:
stop_btn.setStyle("icon", square_mc);
player_btn.setStyle("icon", next_mc);
import flash.events.Event
import flash.events.MouseEvent;
import flash.media.SoundTransform;
var alreadyDefined:Boolean;
volumen.value = 1;
if(!alreadyDefined){
alreadyDefined=true;
var isPlaying:Boolean = new Boolean();
var pausePosition:Number = new Number();
var soundClip:Sound = new Sound();
var sndChannel:SoundChannel;
soundClip.load(new URLRequest("audio/music.mp3"));
soundClip.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
player_btn.addEventListener(MouseEvent.MOUSE_DOWN, btnPressController, false, 0, true);
stop_btn.addEventListener(MouseEvent.MOUSE_DOWN, btnPressStop, false, 0, true);
function onComplete(evt:Event):void {
sndChannel = soundClip.play();
isPlaying = true;
function btnPressController(evt:MouseEvent):void
switch(isPlaying)
case true:
//controller.text ="Sound Paused";
player_btn.setStyle("icon", pause_mc);
pausePosition = sndChannel.position;
sndChannel.stop();
isPlaying = false;
break;
case false:
//controller.text ="Sound Playing";
player_btn.setStyle("icon", next_mc);
sndChannel = soundClip.play(pausePosition);
isPlaying = true;
break;
function btnPressStop(evt:MouseEvent):void
pausePosition = 0;
sndChannel.stop();
//controller.text ="Play Sound";
player_btn.setStyle("icon", next_mc);
isPlaying = false;
volumen.addEventListener(Event.CHANGE, sliderChanged);
function sliderChanged(evt:Event):void {
var vol:Number = volumen.value;
volumen.liveDragging = true;
var st:SoundTransform = new SoundTransform(vol);
if(sndChannel != null){
sndChannel.soundTransform = st;
exit_btn.addEventListener(MouseEvent.CLICK, fexit);
function fexit(event:MouseEvent):void{
SoundMixer.stopAll();
Loader(this.parent).unloadAndStop();
I have another slider component on the movie with instance name PROGRESO
I would like for PROGRESOnto indicate (update) the sounds progress as it plays and be able to scrub through the sound.
Any idea how I can achieve this? Thanks for any helpThanks Andrei.
But I really dont understand. You see, I am not too good (actually pretty bad) with Ationscript 3.
Att.,
Edwin
I managed to get it to move each second though with this:
var myTimer:Timer = new Timer(1000);
myTimer.addEventListener(TimerEvent.TIMER, runTimer);
myTimer.start();
function runTimer(event:TimerEvent):void {
trace("Hello");
progreso.value = progreso.value+1; -
I'm working on an mp3 player in AS3 and I just discovered
what appears to be a bug in the Sound class when loading mono
mp3's. The "length" property is reported as twice the actual length
while the file loads. The moment it's complete, the length property
snaps to the correct value.
Also, even after the file is completely loaded, it is
impossible to seek to anywhere past the halfway point of the audio.
This means that if a user "pauses" the audio and then hits the play
button again (anywhere in the second half of the file), it won't
actually play.
I found a post about this from someone on this forum back in
2005, but it doesn't seem to be resolved. I've been specifically
testing 22khz mono mp3's. 44khz stereo ones work fine, so my guess
is that it has something to do with Mono.
Can anyone help? I can post examples and source code if
necessary. Thank you! --BenI'm banging my head because I can't find a solution to make my arch-install detect an audio CD
I assume that you mean the optical drive. I don't see a /dev/sr0 in /dev
Does it show up with lsblk or parted -l?
Looks like it's a LiteOn drive.
You can play an audio CD.
mplayer cdda://
mpv cdda://track[−endtrack][:speed][/device] −−cdrom−device=PATH
An audio CD doesn't have a mountable file system on it. -
As3 script to edit sound files -
A wav or mp3 file will be taped or various. Is there any script to edit these files in batch ie: to Trim the beginnings ie: no sound parts. Or would I have to use a sound editor. As I say I don't want to do it manually. This sounds like a stupid use but it's important as I have children taping themselves and can't use a 3 party product to edit. Perhaps AIR has something in an API.
CheersCan this be done with differing lengths of white spaces ie: Does the class detect where the white space is and how long it is or do I have to tell it which means it's no good to me.
-
Solution - AC3 DTS D3D EAX Full positional sound to Home Theatre Recei
Why you, the best porducer of sound cards in the world doen't have a solution like that.
http://www.cmedia.com.tw/product/CMI976.htm
Only more few transintors to add to the 5 million you have a you have it. in the top one X-fi cards.
Regards,
Marco PoloPeople just don't GET audio.
A PC is not like a DVD player. One of the main reasons for AC3 and DTS is that the media on which motion pictures are typically stored (ie. the DVD) does not have enough storage capacity to hold a feature-length's worth of multi-channel audio.
The reasons why the actual AC3/DTS stream is sent over a physical cable to the receiver are many:
) Content providers don't like the idea of uncompressed and unencrypted audio transmitting over cables which can easily be intercepted and copied bit-for-bit.
2) Since not everyone has surround sound speakers, it doesn't make sense to add cost to the DVD player by having AC3 and DTS decoders on board.
The major difference between DVD's and games in terms of audio is that for DVD's the sound is already pre-recorded and only needs to be played back. For games, the sound mix is created interacti'vely. The fact that the sound in games is created interacti'vely makes a technology such as AC3/DTS irrelevant because ) it doesn't need to be stored which means there are no constraints leading to the need for compression, and 2) there is no issue with content protection because the interacti've sound mix coming from a game does not in and of itself represent someone's intellectual property (like a music recording or movie soundtrack).
The fact that AC3/DTS is digital is incidental. "Digital" is not magic, its just a convenient storage format. ALL sound ultimately must be converted to an analog signal to be played on speakers. On PC's which haven't been typically connected to home theater receivers, there is no point to doing this digital-analog conversion anywhere but the soundcard itself. Thus, digital speakers for PC's, when used exclusi'vely with a PC, are mere gimmicks.
Now, you may understand all this yet still argue that the ability to output AC3/DTS from a PC serves a purpose. This way, a PC can be used as a home theater server that is ALSO capable of playing games, with ALL sound (games included) encoded in the AC3/DTS format. It may be convenient if your receiver does not have the multi-channel analog inputs necessary to get surround in PC games, especially if you have unused optical/coax inputs on your receiver. For this situation, Creative has developed the DTS-60 external decoder device. Yes, it is another $00 bucks, but think of it this way: the real-time AC3 cards generally cost around $00, but they have none of the other 3D audio hardware acceleration offered by the X-Fi. The X-Fi (cheap version) costs around $00 bucks but doesn't included the encoding stuff. AC3 or DTS encoding is NOT free. If you feel that you don't need the hardware acceleration of interacti've 3D audio offered by the X-Fi, go ahead and buy a HDA-Mystique. If you want the best, get an X-Fi and the DTS-60 (when it comes out).
I'd imagine that in the future, Creative will come out with a soundcard that features integrated DTS Interacti've encoding. -
Trouble Understanding variables
I am committed to learning A3, but HOLY CRAP!! I have never
been a programmer, just a lowly designer. Apparently a pretty dumb
designer! :)
I can breeze through this in AS2 with no problem, but AS3 is
killin' me! I am trying to create a music player that will embed in
a web page, it will be XML driven and the XML will be populated via
a database and generated by PHP. I am using a listbox component to
display the playlist (from the XMLfile). I have figured out how to
start playing the first mp3 on the list.
Now when the user click a different button, I can get that
song to play also, but I ended up created a second sound object, so
the two play at the same time. Not good. I have tried and tried to
access the object that is playing the first sound so I can stop it
and load a new sound into it - I am about to pull my hair out!
I seem to missing a basic understanding of how to access this
object and change the variable value so I can play a new song. Any
help would be GREATLY appreciated!!Vern,
> If I understand correctly: any variable I am going to
use outside
> of the function that assigns its value needs to be
declared OUTSIDE
> of that function first?
Yes.
> Once declared it can be used anywhere, but if it isn't
declared
> outside, then the value is stuck inside that function.
Is that correct?
Close. In fact, if you're coding in the main timeline,
you're so close,
you could arguably define it in those terms and be fine.
Variables (and
functions) are available to the scope in which they're
declared. If you
declare a variable in the main timeline, then that variable
is available in
that frame and any subsequent frame of that timeline.
Depending on the
circumstances of your FLA, the main timeline may indeed feel
like
"everywhere," to the point where the variable could be said
to be used
"anywhere" -- but it's really not much different from the
restriction a
variable feels when declared inside a function; it's just
that the whole
movie takes place inside that "function"/FLA/SWF.
> If I got that right, then for my scrubber, I need to set
up some
> variables that hold SoundChannel.position, Sound.length,
> MovieClip.position
> THEN create a function which assigns values and
calculate the
> MovieClip.position
Yes. That way, any number of functions can use those
variables. But
keep in mind, all you really need are variables that point to
your instances
of Sound, SoundChannel, and MovieClip. Then use those
variables to
reference the necessary properties of those classes. (In
other words, no
need to make a mySound variable *and* a mySoundLength
variable: the mySound
variable suffices, because it leads to the Sound.length
property as simply
as mySound.length.)
> I never liked how clunky onEnterFrame could is. I assume
the Timer
> class is a bit more streamlined?
It's just another tool in the toolbox. :) Timer is the
recommended new
version of setInterval() and setTimeout() combined.
> I am so used to _root.movieClip.variable=foo; (I mean
the easy
> access to any variable from anywhere) but change is
good, I like
> change. Change is good.
I like change in my pocket! ;) The thing about an expression
like
_root.movieClip.variable is that you could often just
reference the variable
anyway, without the need for the "_root" reference. AS3 has
root (no
underscore), which behaves in many ways like _root, but dig
into that a bit
... you'll find some important differences.
> So it sounds as if, to include the loadbar within all of
this, then I need
> to move the playHead along the width of the loadbar, not
a set length
> in pixels.
You could do a set length, but it's much more flexible if
you use the
width of some other object, like a track or some other movie
clip. If you
go with the width of some object, you can *change* the width
of that object
and the code still works.
> The drag part should be easy enough, but adjusting the
actual audio
> from that may give some fits!
To derive volume, you'll take the position of the draggable
knob along
its track and divide that by the width of the track. Assume
you have a
ridiculously long volume track, 500px. The volume knob has
been dragged
halfway across, to 250px. 250 / 500 is 0.5, which is the AS3
way of
specifying 50% volume. Now imagine the track is 50px wide.
The knob has
been dragged all the way across (to 50px). 50 / 50 is 1,
which is 100%
volume. And so on.
> But here is my real question about that, will it be OK
to try and add
> that functionality in once the actual playHead is
working, or is
> that a mistake to not include it from the beginning?
Ehh, for something like this -- especially if you're
teaching yourself
and involved in a learning experience -- I'd say it doesn't
matter one way
or the other. Take small steps and master each step. Sooner
or later, what
you're doing will "click" for you, and after that, you'll
find that you can
add or remove features as you please.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."
Maybe you are looking for
-
The report l runs very night and gets ended with error
Dear all, I am facing a problem in solution manger. There is an report (Program/Command RDSMOPSOL_MONIREFRESH ) will runs very night and get ended with error and there is Run-time error "MESSAGE_TYPE_X". Please suggest how to solve the problem. Is t
-
Is there any way to switch between using two different phones?
I know when phones have SIM cards (like with ATT), you can use two different phones by simply moving the SIM card from one phone to the other and ATT is none the wiser. Is there any way to do that sort of thing with Verizon? I currently have an iPhon
-
we are looking for a filesystem level encryption technology. At this point most of our services are on zfs. At one time I saw encryption on the roadmap for zfs features. Where does this sit now? Are there test bed versions of opensolaris where we can
-
Pasted images always landing slightly off-center. Is there a fix?
I'm editing individual frames of an animation sequence. I find that when I add the next frame (jpg) as a new layer, it always lands a few pixels off from where it should be. Every frame is exactly the same size (1920x1080) and when photoshop opens an
-
LMS3.2/CWA1.2.0: Device troubleshooting - Timed out
Hi, Customer has LMS 3.2 on windows 2008. They have this issue since they have upgrade to LMS 3.2. He has a multi-server config. Both master and slave have the same issue. When trying to launch Device troubleshooting, cu has an error message "Error :