Lines 33-43
Link Here
|
33 |
#include <cdio/sector.h> |
33 |
#include <cdio/sector.h> |
34 |
#include <cdio/cd_types.h> |
34 |
#include <cdio/cd_types.h> |
35 |
|
35 |
|
36 |
#if LIBCDIO_VERSION_NUM >= 90 |
|
|
37 |
#include <cdio/paranoia/cdda.h> |
36 |
#include <cdio/paranoia/cdda.h> |
38 |
#else |
|
|
39 |
#include <cdio/cdda.h> |
40 |
#endif |
41 |
|
37 |
|
42 |
#include <cddb/cddb.h> |
38 |
#include <cddb/cddb.h> |
43 |
|
39 |
|
Lines 540-566
Link Here
|
540 |
if (aud_get_bool ("CDDA", "use_cdtext")) |
536 |
if (aud_get_bool ("CDDA", "use_cdtext")) |
541 |
{ |
537 |
{ |
542 |
AUDDBG ("getting cd-text information for disc\n"); |
538 |
AUDDBG ("getting cd-text information for disc\n"); |
543 |
#if LIBCDIO_VERSION_NUM >= 90 |
|
|
544 |
pcdtext = cdio_get_cdtext (pcdrom_drive->p_cdio); |
539 |
pcdtext = cdio_get_cdtext (pcdrom_drive->p_cdio); |
545 |
if (pcdtext == nullptr) |
540 |
if (pcdtext == nullptr) |
546 |
#else |
|
|
547 |
pcdtext = cdio_get_cdtext (pcdrom_drive->p_cdio, 0); |
548 |
if (pcdtext == nullptr || pcdtext->field[CDTEXT_TITLE] == nullptr) |
549 |
#endif |
550 |
{ |
541 |
{ |
551 |
AUDDBG ("no cd-text available for disc\n"); |
542 |
AUDDBG ("no cd-text available for disc\n"); |
552 |
} |
543 |
} |
553 |
else |
544 |
else |
554 |
{ |
545 |
{ |
555 |
#if LIBCDIO_VERSION_NUM >= 90 |
|
|
556 |
trackinfo[0].performer = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_PERFORMER, 0)); |
546 |
trackinfo[0].performer = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_PERFORMER, 0)); |
557 |
trackinfo[0].name = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_TITLE, 0)); |
547 |
trackinfo[0].name = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_TITLE, 0)); |
558 |
trackinfo[0].genre = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_GENRE, 0)); |
548 |
trackinfo[0].genre = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_GENRE, 0)); |
559 |
#else |
|
|
560 |
trackinfo[0].performer = String (pcdtext->field[CDTEXT_PERFORMER]); |
561 |
trackinfo[0].name = String (pcdtext->field[CDTEXT_TITLE]); |
562 |
trackinfo[0].genre = String (pcdtext->field[CDTEXT_GENRE]); |
563 |
#endif |
564 |
} |
549 |
} |
565 |
} |
550 |
} |
566 |
|
551 |
|
Lines 568-597
Link Here
|
568 |
bool cdtext_was_available = false; |
553 |
bool cdtext_was_available = false; |
569 |
for (int trackno = firsttrackno; trackno <= lasttrackno; trackno++) |
554 |
for (int trackno = firsttrackno; trackno <= lasttrackno; trackno++) |
570 |
{ |
555 |
{ |
571 |
#if LIBCDIO_VERSION_NUM < 90 |
|
|
572 |
if (aud_get_bool ("CDDA", "use_cdtext")) |
573 |
{ |
574 |
AUDDBG ("getting cd-text information for track %d\n", trackno); |
575 |
pcdtext = cdio_get_cdtext (pcdrom_drive->p_cdio, trackno); |
576 |
if (pcdtext == nullptr || pcdtext->field[CDTEXT_PERFORMER] == nullptr) |
577 |
{ |
578 |
AUDDBG ("no cd-text available for track %d\n", trackno); |
579 |
pcdtext = nullptr; |
580 |
} |
581 |
} |
582 |
#endif |
583 |
|
584 |
if (pcdtext != nullptr) |
556 |
if (pcdtext != nullptr) |
585 |
{ |
557 |
{ |
586 |
#if LIBCDIO_VERSION_NUM >= 90 |
|
|
587 |
trackinfo[trackno].performer = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_PERFORMER, trackno)); |
558 |
trackinfo[trackno].performer = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_PERFORMER, trackno)); |
588 |
trackinfo[trackno].name = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_TITLE, trackno)); |
559 |
trackinfo[trackno].name = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_TITLE, trackno)); |
589 |
trackinfo[trackno].genre = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_GENRE, trackno)); |
560 |
trackinfo[trackno].genre = String (cdtext_get_const (pcdtext, CDTEXT_FIELD_GENRE, trackno)); |
590 |
#else |
|
|
591 |
trackinfo[trackno].performer = String (pcdtext->field[CDTEXT_PERFORMER]); |
592 |
trackinfo[trackno].name = String (pcdtext->field[CDTEXT_TITLE]); |
593 |
trackinfo[trackno].genre = String (pcdtext->field[CDTEXT_GENRE]); |
594 |
#endif |
595 |
cdtext_was_available = true; |
561 |
cdtext_was_available = true; |
596 |
} |
562 |
} |
597 |
} |
563 |
} |