Mercurial > pidgin.yaz
comparison src/gtksound.c @ 12411:8c339d9f1bb4
[gaim-migrate @ 14718]
Use the glib byte order macros, so we can prune out configure.ac a bit. Also, add a warning in case someone tries to compile this on a machine with an unknown byte ordering. I really don't think that'll happen, but it doesn't hurt to be thorough.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 08 Dec 2005 20:59:49 +0000 |
parents | 4d3119205a33 |
children | a8bffa7fb6ac |
comparison
equal
deleted
inserted
replaced
12410:bc249de5ea02 | 12411:8c339d9f1bb4 |
---|---|
472 format.bits = 16; | 472 format.bits = 16; |
473 | 473 |
474 afSetVirtualSampleFormat(file, AF_DEFAULT_TRACK, | 474 afSetVirtualSampleFormat(file, AF_DEFAULT_TRACK, |
475 AF_SAMPFMT_TWOSCOMP, format.bits); | 475 AF_SAMPFMT_TWOSCOMP, format.bits); |
476 | 476 |
477 #if __BYTE_ORDER == __BIG_ENDIAN | 477 #if G_BYTE_ORDER == G_BIG_ENDIAN |
478 format.byte_format = AO_FMT_BIG; | 478 format.byte_format = AO_FMT_BIG; |
479 afSetVirtualByteOrder(file, AF_DEFAULT_TRACK, | 479 afSetVirtualByteOrder(file, AF_DEFAULT_TRACK, |
480 AF_BYTEORDER_BIGENDIAN); | 480 AF_BYTEORDER_BIGENDIAN); |
481 #elif __BYTE_ORDER == __LITTLE_ENDIAN | 481 #elif G_BYTE_ORDER == G_LITTLE_ENDIAN |
482 format.byte_format = AO_FMT_LITTLE; | 482 format.byte_format = AO_FMT_LITTLE; |
483 afSetVirtualByteOrder(file, AF_DEFAULT_TRACK, | 483 afSetVirtualByteOrder(file, AF_DEFAULT_TRACK, |
484 AF_BYTEORDER_LITTLEENDIAN); | 484 AF_BYTEORDER_LITTLEENDIAN); |
485 #else | |
486 #warning Unknown endianness | |
485 #endif | 487 #endif |
486 | 488 |
487 bytes_per_frame = format.bits * format.channels / 8; | 489 bytes_per_frame = format.bits * format.channels / 8; |
488 | 490 |
489 device = ao_open_live(ao_driver, &format, NULL); | 491 device = ao_open_live(ao_driver, &format, NULL); |