HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

Go Back   HardwareHeaven.com > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > General Discussion


Reply
 
Thread Tools
Old Apr 16, 2003, 09:56 PM   #1
DriverHeaven Junior Member
 
Join Date: Jul 2002
Location: Netherlands
Posts: 24
Rep Power: 0
Guillaume is on a distinguished road

SPDIF bypass command from within other programme

Please have a look at this topic: http://www.hydrogenaudio.org/show.ph...ST/f/27/t/8202
__________________
Listen to Guillaume
I see seven towers, but I only see one way out...
AMD Athlon 1,2GHz, 512MB Ram PC133 (M.teq), Asus A7V133, 160GB WD + 20GB WD, Sapphire Radeon 9600XT, Creative SB Audigy 1394, Hoontech SB DBII Bracket, Pioneer 106D DVD-writer, Plextor 12/10/32A CD-RW, Iiyama ProLite E481S
Guillaume is offline   Reply With Quote


Old Apr 16, 2003, 11:46 PM   #2
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 3,119
Rep Power: 75
Eugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud of

one can turn bypass on and off by executing kxctrl from the command line

kxctrl -shw 3 0
kxctrl -shw 3 1

there are additional controllable parameters
refer to ikx.h file in the SDK ("ids for get_hw_parameter")

/Eugene
Eugene Gavrilov is offline   Reply With Quote
Old Apr 17, 2003, 08:25 AM Threadstarter Thread Starter   #3
DriverHeaven Junior Member
 
Join Date: Jul 2002
Location: Netherlands
Posts: 24
Rep Power: 0
Guillaume is on a distinguished road

That's perfect! Which way has the lowest 'latency' (the bypass should be turned on right after a track stops and immediately turned off again, so that the gap is minimal).
__________________
Listen to Guillaume
I see seven towers, but I only see one way out...
AMD Athlon 1,2GHz, 512MB Ram PC133 (M.teq), Asus A7V133, 160GB WD + 20GB WD, Sapphire Radeon 9600XT, Creative SB Audigy 1394, Hoontech SB DBII Bracket, Pioneer 106D DVD-writer, Plextor 12/10/32A CD-RW, Iiyama ProLite E481S
Guillaume is offline   Reply With Quote
Old Apr 18, 2003, 12:08 AM   #4
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 3,119
Rep Power: 75
Eugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud of

I'm afraid that the latency will be rather high
I suggest you download and read the SDK -- the function of interst is iKX::set_hw_parameter

also, you could try using a 'trick' with kX mixer: save the settings file with the only one checkbox enabled -- 'HW Parameters'. if you save two separate *.kx settings files (the one with 'bypass' enabled, and the other - with disabled), you'll be able to load them on-the-fly by executing: kxmixer --shell --load-settings <file_name>

calling "kxmixer --shell ..." is much faster than running kxctrl

/Eugene
Eugene Gavrilov is offline   Reply With Quote
Old Apr 18, 2003, 06:31 AM   #5
DriverHeaven Junior Member
 
Join Date: Oct 2002
Posts: 30
Rep Power: 0
kode54 is on a distinguished road

As I just realized myself and indicated in that topic, there is no easy way to code a plug-in which will do this and also account for output latency.
kode54 is offline   Reply With Quote
Old Apr 18, 2003, 07:57 AM   #6
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 3,119
Rep Power: 75
Eugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud of

>> latency

unless you use ikX::get_hw_parameter directly

/Eugene
Eugene Gavrilov is offline   Reply With Quote
Old Apr 18, 2003, 08:42 AM   #7
DriverHeaven Junior Member
 
Join Date: Oct 2002
Posts: 30
Rep Power: 0
kode54 is on a distinguished road

I wasn't referring to latency of executing the command, but latency in the player plug-in which will be triggering this effect. If coded as a DSP, it will receive end-of-track signal as an audio file finishes playing, but at that moment, there will still be an unknown amount of sample chunks from the end of that file waiting in queue for the DSP processing call that receives EOT signal. Not only that, but the output plug-in will also have a full buffer until those samples are processed and flushed. So, with an output latency of 1000ms, the bypass signal may be triggered as much as 1 second before the actual end of track reaches the SPDIF.

It could be coded as a new output plug-in, but I'm not sure if outputs are flushed between tracks or not... might not if they're the same sample rate, or if user has enabled a resampling DSP. Oh, the complications.
kode54 is offline   Reply With Quote
Old Apr 18, 2003, 09:26 AM Threadstarter Thread Starter   #8
DriverHeaven Junior Member
 
Join Date: Jul 2002
Location: Netherlands
Posts: 24
Rep Power: 0
Guillaume is on a distinguished road

Quote:
Originally posted by kode54
I wasn't referring to latency of executing the command, but latency in the player plug-in which will be triggering this effect. If coded as a DSP, it will receive end-of-track signal as an audio file finishes playing, but at that moment, there will still be an unknown amount of sample chunks from the end of that file waiting in queue for the DSP processing call that receives EOT signal. Not only that, but the output plug-in will also have a full buffer until those samples are processed and flushed. So, with an output latency of 1000ms, the bypass signal may be triggered as much as 1 second before the actual end of track reaches the SPDIF.

It could be coded as a new output plug-in, but I'm not sure if outputs are flushed between tracks or not... might not if they're the same sample rate, or if user has enabled a resampling DSP. Oh, the complications.
That latency of 1000ms you're talking about, is this exactly the same as the buffer size? Shouldn't the plugin be able to delay the ikX::get_hw_parameter command exactly as the time the buffer is set to (could be manually entered into plugin config or got from active output plugin config)???
__________________
Listen to Guillaume
I see seven towers, but I only see one way out...
AMD Athlon 1,2GHz, 512MB Ram PC133 (M.teq), Asus A7V133, 160GB WD + 20GB WD, Sapphire Radeon 9600XT, Creative SB Audigy 1394, Hoontech SB DBII Bracket, Pioneer 106D DVD-writer, Plextor 12/10/32A CD-RW, Iiyama ProLite E481S
Guillaume is offline   Reply With Quote
Reply

Thread Tools