Perhaps your sound card doesn't support the sound format being used.
Attached is an exe that will display information about output devices on your computer. The data is saved in a file called "sound device results.txt", please attach this to your next post.
In the simple client sound demo the sound format is default which is 1 channel, 22.05 kHz, 8 bits per sample (medium quality).
Here is the code for the application:
#include <iostream>
#include <fstream>
#include <MikeNet.h>
using namespace std;
void main()
{
mnStartSound(0,0);
// Write results to file
cout << "Writing to file...n" << 'n';
char FileName[] = "sound device results.txt";
remove(FileName);
fstream file(FileName,fstream::out);
if (file.is_open() == false)
{
cout << "Failed to create filen";
goto end;
}
for(unsigned int n = 0;n<mnGetNumOutputDevices();n++)
{
file << "DEVICE " << n << 'n';
file << "Name: " << mnGetDeviceName(n,true) << 'n';
file << "Driver version: " << (int)mnGetDeviceDriverMajorVersion(n,true) << '.' << (int)mnGetDeviceDriverMinorVersion(n,true) << 'n';
file << "Manufacturer ID: " << mnGetDeviceManuID(n,true) << 'n';
file << "Product ID" << mnGetDeviceProductID(n,true) << 'n';
file << "Maximum channels: " << mnGetDeviceMaxChannels(n,true) << "nn";
unsigned int SupportInfo = mnGetDeviceFormatSupport(n,true);
// KHZ: Samples per second in kilohertz.
// Possible options are 11 (11.025 kHz), 22 (22.05 kHz), 44 (44.1 kHz), 48 and 96.
// Channels: The number of channels. Possible options are 1 and 2.
// Bits: Bits per sample. Possible options are 8 and 16.
file << "11.025 kHz, 1 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,11,1,8) << 'n';
file << "22.05 kHz, 1 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,22,1,8) << 'n';
file << "44.1 kHz, 1 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,44,1,8) << 'n';
file << "48 kHz, 1 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,48,1,8) << 'n';
file << "96 kHz, 1 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,96,1,8) << "nn";
file << "11.025 kHz, 2 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,11,2,8) << 'n';
file << "22.05 kHz, 2 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,22,2,8) << 'n';
file << "44.1 kHz, 2 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,44,2,8) << 'n';
file << "48 kHz, 2 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,48,2,8) << 'n';
file << "96 kHz, 2 channel, 8 bits: " << mnReadDeviceFormatSupport(SupportInfo,96,2,8) << "nn";
file << "11.025 kHz, 1 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,11,1,16) << 'n';
file << "22.05 kHz, 1 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,22,1,16) << 'n';
file << "44.1 kHz, 1 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,44,1,16) << 'n';
file << "48 kHz, 1 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,48,1,16) << 'n';
file << "96 kHz, 1 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,96,1,16) << "nn";
file << "11.025 kHz, 2 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,11,2,16) << 'n';
file << "22.05 kHz, 2 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,22,2,16) << 'n';
file << "44.1 kHz, 2 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,44,2,16) << 'n';
file << "48 kHz, 2 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,48,2,16) << 'n';
file << "96 kHz, 2 channel, 16 bits: " << mnReadDeviceFormatSupport(SupportInfo,96,2,16) << "nn";
// Supports left and right volume control (mnSetHardwareVolume): 8
// Supports pitch control (mnSetHardwarePitch): 1
// Supports playback rate control (mnSetHardwarePlaybackRate): 2
// Supports volume control (mnSetHardwareVolume): 4
// The driver is synchronous and will block while playing a buffer: 16
file << "LR volume control: " << mnGetDeviceHardwareSupport(0,8) << 'n';
file << "Pitch control: " << mnGetDeviceHardwareSupport(0,1) << 'n';
file << "Playback rate control: " << mnGetDeviceHardwareSupport(0,2) << 'n';
file << "Volume control: " << mnGetDeviceHardwareSupport(0,4) << 'n';
file << "Synchronous: " << mnGetDeviceHardwareSupport(0,16) << "nn";
file << "nn";
}
// Open file to read
file.close();
file.open(FileName,ios::in | ios::binary);
if (file.is_open() == false)
{
cout << "Failed to open filen";
goto end;
}
// Get length of file
file.seekg(0,ios::end);
unsigned int Length = file.tellg();
// Store file as char *
char * Data = new char[Length+1];
// Load Data with file contents
file.seekg(0,ios::beg);
file.read(Data,Length);
// Close file
file.close();
// Add null terminator
Data[Length] = '';
// Display file contents
cout << Data;
// Deallocate
delete[] Data;
end:
mnFinishSound();
system("PAUSE");
}
If you want to talk to me directly via MSN then you can leave me offline messages and we can communicate that way. It seems that we are rarely online at the same time