sizeof(var) is the size of the POINTER
sizeof(*var) is the size of the TYPE
Now it should work...
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7314
d7cf8633-e32d-0410-b094-
e92efae38249
// we can only do 16bit per sample for now
if(suggested != NULL)
{
- memcpy (suggested, requested, sizeof (suggested));
+ memcpy (suggested, requested, sizeof (*suggested));
suggested->width = 2;
}
return false;
{
if (suggested != NULL)
{
- memcpy (suggested, requested, sizeof (suggested));
+ memcpy (suggested, requested, sizeof (*suggested));
suggested->channels = streamDesc.mChannelsPerFrame;
suggested->speed = streamDesc.mSampleRate;
}