IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
oggdec.c compilation problem, reference to dither_output not found
Vytautas
post Feb 13 2004, 15:08
Post #1





Group: Members
Posts: 6
Joined: 13-February 04
From: Warragul, Victoria, Australia
Member No.: 11993



I'm trying to write a plugin for an installer to enable it to convert ogg files to wav files and also playback ogg files.

After having a look at some ogg implementations I descided that the source code for oggdec.exe was the most appriopriate starting point for the plugin. After countless hours of trying to get the dll to compile, libvorbis and other ogg libraries are compiled with MSVC and my compiler does not like those libraries, I almost got it to work.

No matter where I searched though I could not find the source code for dither_output function. If I comment out the relevant function call in oggdec.c, which is called unless the sound file is in float format, the dll compiles and when run in ogg2wav mode produces a wave file of the right size, however the wave file does not contain any sound.

Running this version of the dll in play mode produces an error saying that the memory address 'x' could not be read from 'y', or something along those lines. I assume that both of these problems are related to the removed call to dither_output function.

So has anyone come across this problem before and how would one go about solving it?

Vytautas

PS. I hope that I'm in the right forum.
Go to the top of the page
+Quote Post
john33
post Feb 13 2004, 20:27
Post #2


xcLame and OggDropXPd Developer


Group: Developer
Posts: 3713
Joined: 30-September 01
From: Bracknell, UK
Member No.: 111



You must be using my oggdec, I guess. wink.gif The 'dither_output' function begins at line# 248 in oggdec.c. You can just copy the function over to wherever you want it. smile.gif


--------------------
John
----------------------------------------------------------------
My compiles and utilities are at http://www.rarewares.org/
Go to the top of the page
+Quote Post
Vytautas
post Feb 13 2004, 23:38
Post #3





Group: Members
Posts: 6
Joined: 13-February 04
From: Warragul, Victoria, Australia
Member No.: 11993



Thanks, and don't I feel like an idiot. I was using that file and usually I only comment out unused functions when I'm trying to get a program to compile. But for some strange reason I actually deleted one function and guess which one it was. rolleyes.gif

Yes the plugin now works fine, just a bit more cosmetic work to do but I should be able to handle that.

Just as a side note/question when I use the play function the plugin does not return the control to the program until it has finished playing the song. Is there any way aroung that?

Vytautas biggrin.gif
Go to the top of the page
+Quote Post
john33
post Feb 14 2004, 00:00
Post #4


xcLame and OggDropXPd Developer


Group: Developer
Posts: 3713
Joined: 30-September 01
From: Bracknell, UK
Member No.: 111



I am sure the answer must be, yes, but don't ask me how in the sense that my code was not required to do that. You may get a clue to that from looking at the source for Winamp plugins. wink.gif


--------------------
John
----------------------------------------------------------------
My compiles and utilities are at http://www.rarewares.org/
Go to the top of the page
+Quote Post
Vytautas
post Feb 15 2004, 01:08
Post #5





Group: Members
Posts: 6
Joined: 13-February 04
From: Warragul, Victoria, Australia
Member No.: 11993



Thanks, I figgured that out. Had to make the player function run in a different thread.

I noticed that when converting from ogg to wav the cpu usage is around 100% is that normal or have I done something wrong?

Vytautas
Go to the top of the page
+Quote Post
john33
post Feb 15 2004, 11:07
Post #6


xcLame and OggDropXPd Developer


Group: Developer
Posts: 3713
Joined: 30-September 01
From: Bracknell, UK
Member No.: 111



QUOTE (Vytautas @ Feb 15 2004, 12:08 AM)
Thanks, I figgured that out.  Had to make the player function run in a different thread.

I noticed that when converting from ogg to wav the cpu usage is around 100% is that normal or have I done something wrong?

Vytautas

Pretty much normal. It will take all it can get, but with a reasonably powered processor will survive on a lot less. Disabling the dithering will ease the requirement if it becomes critical.


--------------------
John
----------------------------------------------------------------
My compiles and utilities are at http://www.rarewares.org/
Go to the top of the page
+Quote Post
Vytautas
post Feb 15 2004, 12:32
Post #7





Group: Members
Posts: 6
Joined: 13-February 04
From: Warragul, Victoria, Australia
Member No.: 11993



Not sure how critical that would be, will have to talk to other devs to get their opinions. When you say disable the dithering, won't that take me back to the problem with an emply wave file?

Vytautas

BTW your help is greatly appreaciated wink.gif
Go to the top of the page
+Quote Post
john33
post Feb 15 2004, 13:01
Post #8


xcLame and OggDropXPd Developer


Group: Developer
Posts: 3713
Joined: 30-September 01
From: Bracknell, UK
Member No.: 111



QUOTE (Vytautas @ Feb 15 2004, 11:32 AM)
Not sure how critical that would be, will have to talk to other devs to get their opinions.  When you say disable the dithering, won't that take me back to the problem with an emply wave file?

Vytautas

BTW your help is greatly appreaciated  wink.gif

I meant disabling dithering as an option, it will still simply pass through that function and generate normal undithered output.


--------------------
John
----------------------------------------------------------------
My compiles and utilities are at http://www.rarewares.org/
Go to the top of the page
+Quote Post
Vytautas
post Feb 18 2004, 03:54
Post #9





Group: Members
Posts: 6
Joined: 13-February 04
From: Warragul, Victoria, Australia
Member No.: 11993



Do you mean setting dithering to 0? If thats the case it was always disabled.

The guy I have to speak to about the CPU usage appears to be away at the moment, can't find him anywhere wink.gif

I saw some posts in this forum about optimized versions of vorbis, but I assume that those optimizations were only for the encoders or do they apply to decoding also?

Vytautas

PS. The e-mail notification feature does not seem to be working for me for some reason. crying.gif

This post has been edited by Vytautas: Feb 18 2004, 03:55
Go to the top of the page
+Quote Post
john33
post Feb 18 2004, 14:46
Post #10


xcLame and OggDropXPd Developer


Group: Developer
Posts: 3713
Joined: 30-September 01
From: Bracknell, UK
Member No.: 111



QUOTE (Vytautas @ Feb 18 2004, 02:54 AM)
Do you mean setting dithering to 0?  If thats the case it was always disabled.

The guy I have to speak to about the CPU usage appears to be away at the moment, can't find him anywhere  wink.gif

I saw some posts in this forum about optimized versions of vorbis, but I assume that those optimizations were only for the encoders or do they apply to decoding also?

Vytautas

PS. The e-mail notification feature does not seem to be working for me for some reason.  crying.gif

So far as I'm aware, it's encoders only.


--------------------
John
----------------------------------------------------------------
My compiles and utilities are at http://www.rarewares.org/
Go to the top of the page
+Quote Post
Vytautas
post Feb 26 2004, 07:16
Post #11





Group: Members
Posts: 6
Joined: 13-February 04
From: Warragul, Victoria, Australia
Member No.: 11993



john33 is there a way to gracefully stop an ogg stream from playing? I have it setup in a different thread and when I try to stop it it produces a couple of errors.

Vytautas
Go to the top of the page
+Quote Post
john33
post Feb 26 2004, 11:08
Post #12


xcLame and OggDropXPd Developer


Group: Developer
Posts: 3713
Joined: 30-September 01
From: Bracknell, UK
Member No.: 111



I think you'll probably find the answer to that if you have a look through the foobar SDK. wink.gif


--------------------
John
----------------------------------------------------------------
My compiles and utilities are at http://www.rarewares.org/
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th June 2013 - 13:26