equal
deleted
inserted
replaced
22 |
22 |
23 #include "../stdafx.h" |
23 #include "../stdafx.h" |
24 #include "../debug.h" |
24 #include "../debug.h" |
25 #include "../driver.h" |
25 #include "../driver.h" |
26 #include "../mixer.h" |
26 #include "../mixer.h" |
27 #include "../core/endian_func.hpp" |
27 #include "../core/endian_type.hpp" |
28 |
28 |
29 #include "cocoa_s.h" |
29 #include "cocoa_s.h" |
30 |
30 |
31 #undef WindowClass |
31 #undef WindowClass |
32 #undef Point |
32 #undef Point |
59 requestedDesc.mSampleRate = GetDriverParamInt(parm, "hz", 11025); |
59 requestedDesc.mSampleRate = GetDriverParamInt(parm, "hz", 11025); |
60 |
60 |
61 requestedDesc.mBitsPerChannel = 16; |
61 requestedDesc.mBitsPerChannel = 16; |
62 requestedDesc.mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; |
62 requestedDesc.mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; |
63 |
63 |
64 #ifdef TTD_BIG_ENDIAN |
64 #if TTD_ENDIAN == TTD_BIG_ENDIAN |
65 requestedDesc.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian; |
65 requestedDesc.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian; |
66 #endif |
66 #endif /* TTD_ENDIAN == TTD_BIG_ENDIAN */ |
67 |
67 |
68 requestedDesc.mFramesPerPacket = 1; |
68 requestedDesc.mFramesPerPacket = 1; |
69 requestedDesc.mBytesPerFrame = requestedDesc.mBitsPerChannel * requestedDesc.mChannelsPerFrame / 8; |
69 requestedDesc.mBytesPerFrame = requestedDesc.mBitsPerChannel * requestedDesc.mChannelsPerFrame / 8; |
70 requestedDesc.mBytesPerPacket = requestedDesc.mBytesPerFrame * requestedDesc.mFramesPerPacket; |
70 requestedDesc.mBytesPerPacket = requestedDesc.mBytesPerFrame * requestedDesc.mFramesPerPacket; |
71 |
71 |