[opus] Visual Studio build of Opus-1.0.1-rc

Jean-Marc Valin jmvalin at jmvalin.ca
Thu Aug 16 19:20:31 PDT 2012


Hi Hauke,

We just released 1.0.1-rc2 with actual Windows project files. Can you
give it a try and let us know if it works for you?

Cheers,

	Jean-Marc

On 12-08-15 02:22 PM, public-hk wrote:
> Hi everone,
> 
> I currently try to test the Opus codec. It seems, however, that it is 
> more easy to do that in Linux.
> Nevertheless, I have compiled the sources in Visual Studio 2010. Here 
> are some hints:
> 
> 1) "static inline int function(...)" (combination of static and inline) 
> does not work with Visual Studio 2010. I defined a macro which 
> translates all "inline" to nothing.
> 2) I had to define some extra macros which probably are set in the 
> configure-process in Linux, in particular USE_ALLOCA  and OPUS_BUILD
> 
> There is now one warning left which I am not sure about. The lines the 
> compiler complains about are in "opus_private.h"
> 
>  > /* Make sure everything's aligned to sizeof(void *) bytes */
>  > static inline int align(int i)
>  > {
>  >  return (i+sizeof(void *)-1)&-sizeof(void *);
>  > }
> 
> I am not sure how this line is supposed to work. The warning statement is
> 
> "opus_private.h(81): warning C4146: unary minus operator applied to 
> unsigned type, result still unsigned"
> 
> My solution for this to work propperly in Windows would be
> 
>  > /* Make sure everything's aligned to sizeof(void *) bytes */
>  > static inline int align(int i)
>  > {
>  >     return (i+sizeof(void *)-1)&-((int)sizeof(void *));
>  > }
> 
> but I am not sure. What do you think?
> 
> By the way, this release does not compile with Cygwin, in that case, I 
> see undefined references.
> 
> Best regards
> 
> Hauke
> 
> _______________________________________________
> opus mailing list
> opus at xiph.org
> http://lists.xiph.org/mailman/listinfo/opus
> 
> 
> 


More information about the opus mailing list